```typescript { using resource = { [Symbol.dispose] () { console.log('dispose') } } } // output: dispose ``` Node.js and browsers already natively support and can use this syntax. https://v8.dev/features/explicit-resource-management https://github.com/tc39/proposal-explicit-resource-management https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html https://github.com/nodejs/node/pull/58467
Node.js and browsers already natively support and can use this syntax.
https://v8.dev/features/explicit-resource-management
https://github.com/tc39/proposal-explicit-resource-management
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html
nodejs/node#58467