Skip to content

Do not add readonly on enum with the immutable option, #1602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

JeanRemiDelteil
Copy link
Contributor

Changes

Readonly modifier is not applicable to Typescript enum.
This PR makes sure the readonly modifiers is not applied on enum when the --immutable option is used.

Related discussion
#1368 (comment)

How to Review

A question would be how to test this ? As I did not found a way to test with the global --immutable option.
Alternatively I added a test for the 'export' modifier that is used in the code.

Checklist

  • Unit tests updated
  • docs/ updated (if necessary) (not necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript) (=> no changes)

Copy link

changeset-bot bot commented Apr 2, 2024

🦋 Changeset detected

Latest commit: c59e10d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openapi-typescript Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@drwpow drwpow merged commit 9da96cd into openapi-ts:main Apr 3, 2024
6 checks passed
@JeanRemiDelteil JeanRemiDelteil deleted the no-readonly-on-enum branch April 4, 2024 16:52
@drwpow
Copy link
Contributor

drwpow commented Apr 23, 2024

Released in the latest next version. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants