-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e3ece5e
Update `@typescript-eslint` packages
sosukesuzuki 94a8626
Install `typescript`
sosukesuzuki 46bd0eb
Tweaks snapshot tests
sosukesuzuki c8fcbbe
Tweaks error files
sosukesuzuki 4069778
Add tests for `using` with types
sosukesuzuki aeaadad
Add changelog
sosukesuzuki 11270cc
Update misc tests
sosukesuzuki 7f5a053
Update snapshots
sosukesuzuki 18cd431
Revert misc tests and remove `typescript`
sosukesuzuki 0e7b9e8
Update changelog_unreleased/typescript/15321.md
sosukesuzuki 8995420
Fix file name typo
sosukesuzuki fe24bce
Keep valid file
sosukesuzuki 45551c8
Update tests
sosukesuzuki cdcf909
Update changelog_unreleased/typescript/15321.md
sosukesuzuki 64cd2c0
Merge branch 'support-using' of https://github.com/sosukesuzuki/prett…
sosukesuzuki 11555c6
Remove non-existing filenames.
fisker File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#### Support TypeScript 5.2 `using` / `await using` declaration (#15321 by @sosukesuzuki) | ||
|
||
Support for the upcoming Explicit Resource Management feature in ECMAScript. [`using` / `await using` declaration](https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#using-declarations-and-explicit-resource-management) | ||
|
||
<!-- prettier-ignore --> | ||
```tsx | ||
{ | ||
using foo = new Foo(); | ||
await using bar = new Bar(); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
tests/format/misc/errors/js/explicit-resource-management/jsfmt.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
run_spec(import.meta, ["babel", "flow", "typescript"]); | ||
run_spec(import.meta, [ | ||
"babel", | ||
"flow", | ||
// Waiting https://github.com/typescript-eslint/typescript-eslint/issues/7555 and https://github.com/typescript-eslint/typescript-eslint/issues/7554 | ||
// "typescript" | ||
]); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.