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
Support TypeScript 5.2 using
/ await using
declaration
#15321
Conversation
I'll release new patch after this is merged. |
tests/format/js/explicit-resource-management/invalid-for-using-binding-of-of.js
Outdated
Show resolved
Hide resolved
tests/format/misc/errors/js/explicit-resource-management/invalid-using-binding-let.js
Outdated
Show resolved
Hide resolved
tests/format/misc/errors/js/explicit-resource-management/invalid-for-using-binding-in.js
Outdated
Show resolved
Hide resolved
Co-authored-by: fisker Cheung <lionkay@gmail.com>
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.
File name.
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.
File name. Missing "a"
invalid
^
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.
This should be valid, I think it's from babel too.
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.
I believe these two from existing tests? They should be still named "valid"
.
Better put them back, just let typescript parser to throw.
Co-authored-by: fisker Cheung <lionkay@gmail.com>
"valid-for-using-declaration.js", | ||
"valid-await-using-comments.js", | ||
"valid-for-lhs-await-as-identifier.js", | ||
"using-declarations.js", |
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.
typescript-estree throws for these files (tsc doesn't throw).
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.
We can ignore edge cases.
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.
Good job.
Size Change: +20.6 kB (0%) Total Size: 8.5 MB
If it's possible, you can run
To compare the file with main branch see why the file size grows, and try to remove unnessary code. |
@fisker Sure! I'll merge this PR after CI is passed. And I'll try to do reduce bundle size before release. |
If you want do it, in my experience, I suggest you do it before merge, it's easier to switch between branches. Just a quick check is enough, maybe obvious unless code can be found, not necessary to dig deep. |
I tried a little, but it was difficult, so I gave up once! sorry! |
I compared the files, there is noting we can do, we are good. |
…15321) * Update `@typescript-eslint` packages * Install `typescript` * Tweaks snapshot tests * Tweaks error files * Add tests for `using` with types * Add changelog * Update misc tests * Update snapshots * Revert misc tests and remove `typescript` * Update changelog_unreleased/typescript/15321.md Co-authored-by: fisker Cheung <lionkay@gmail.com> * Fix file name typo * Keep valid file * Update tests * Update changelog_unreleased/typescript/15321.md Co-authored-by: fisker Cheung <lionkay@gmail.com> * Remove non-existing filenames. --------- Co-authored-by: fisker Cheung <lionkay@gmail.com>
Description
Fixes #15004
Checklist
docs/
directory).changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨