DisposableStack
DisposableStack copied to clipboard
An ESnext spec-compliant `DisposableStack`, `AsyncDisposableStack`, `Symbol.dispose`, and `Symbol.asyncDispose` shim/polyfill/replacement that works as far down as ES3.
This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more.[View this repository on the Mend.io Web Portal](https://developer.mend.io/github/es-shims/DisposableStack). ## Pending Approval The following branches are...
Minimal TS code: ```ts import 'disposablestack/auto' async function main() { await using stack = new AsyncDisposableStack() stack.defer(() => { console.log('1') }) stack.defer(() => { throw new Error('2') }) } void...