Skip to content

Conversation

RunDevelopment
Copy link

fixes #121

This PR changes the type of ClassRangesCharacterClassElement to not include properties of strings. See #121 for details.

The new type caused a type error in the RegExpParserState#onUnicodePropertyCharacterSet. TypeScript was unable to prove that no StringsUnicodePropertyCharacterSet was added to a ClassRangesCharacterClass. So I changed the parser to fix this type error. I intentionally did not use type casts, so that TypeScript can statically prove that the parser creates a correct AST.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@ota-meshi ota-meshi changed the title Fixed variants of ClassRangesCharacterClassElement feat: Fixed variants of ClassRangesCharacterClassElement Aug 21, 2023
@ota-meshi ota-meshi merged commit 6a8c538 into eslint-community:main Aug 21, 2023
@github-actions
Copy link

🎉 This PR is included in version 4.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants