-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix(typescript) better highlighting of optionals #4114
Conversation
Build Size ReportChanges to minified artifacts in 7 files changedTotal change +71 B View Changes
|
src/languages/lib/ecmascript.js
Outdated
@@ -1,4 +1,4 @@ | |||
export const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; | |||
export const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*\\??'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ?
truly a valid ECMAScript identifier, or just in TS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Youre right , ive managed to scope the new fix to just ts in the new commit
src/languages/typescript.js
Outdated
const namespace = 'bar'; | ||
*/ | ||
|
||
const OPTIONAL_PROPERTY_RE = IDENT_RE + '\\s*\\?'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide an example of what this is trying to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in my new commit ive added some test so i found that it was failing on some new tcs so ill explain the new one
Build Size ReportChanges to minified artifacts in 2 files changedTotal change +74 B View Changes
|
Build Size ReportChanges to minified artifacts in 7 files changedTotal change +79 B View Changes
|
Build Size ReportChanges to minified artifacts in 7 files changedTotal change +79 B View Changes
|
I rewrote this to use more of the existing |
The tests [you provided] (including the one you show above) are all still green... given that the tests are all green, my version has the exact same behavior as yours. So... not sure what you are seeing.
It's just a bit too complex... we usually try for the simplest solutions. |
ah my apologies i changed to a different style and thought comment were being highlighted wrong |
Fixed the optional property in ts not being highlighted
Resolves #3613
before:
after:
Checklist
CHANGES.md