Standard built-ins
Symbol.asyncDispose
Key identifying an asynchronous cleanup method. Awaiting a manually invoked method demonstrates its contract, not await using syntax support.
Formal Syntax & Structure
javascript syntaxjavascript
Symbol.asyncDisposeReturn Value
symbol
The predefined protocol key.
Working Example
Example Snippetjavascript
const r={async [Symbol.asyncDispose](){return "released";}};(async()=>console.log(await r[Symbol.asyncDispose]()))();