Skip to content

Conversation

duncanbeevers
Copy link
Collaborator

Although support was added for readonly values passed to Types.enum, the same functionality was not added to the Types.string and Types.number enum options member.

Comment on lines +159 to +175
const options = {
maximum: 9,
minimum: 2,
multipleOf: 2,
});
} as const;
types.number(options);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not to be defined as const. Please keep this options object inline.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct that this test case doesn't exercise any new readonly functionality. I'll revert this portion of the change.

In the subsequent test, the separate declaration is necessary.

image

@duncanbeevers
Copy link
Collaborator Author

duncanbeevers commented Feb 17, 2025 via email

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.

3 participants