Skip to content

await using normative changes#58624

Merged
rbuckton merged 2 commits intomainfrom
fix58077
May 29, 2024
Merged

await using normative changes#58624
rbuckton merged 2 commits intomainfrom
fix58077

Conversation

@rbuckton
Copy link
Contributor

@rbuckton rbuckton commented May 22, 2024

This aligns TypeScript with a number of normative updates to the Explicit Resource Management proposal, per #58622:

  • [Symbol.dispose]() methods are wrapped in a closure when used in an await using declaration.
  • Promise-like values returned by [Symbol.dispose]() are ignored in an await using declaration.
  • Synchronous exceptions thrown by [Symbol.dispose]() in an await using declaration are turned into rejections.

See microsoft/tslib#258 for the companion PR for tslib.

Fixes #58077
Fixes #58622

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

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

3 participants