1.0.1 • Published 5 months ago

@shigen/polyfill-symbol-dispose v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Polyfill for Symbol.dispose and Symbol.asyncDispose

NPM Version

This is a lightweight polyfill for the wellknown symbols dispose and asyncDispose as defined in the proposal for Explicit Resource Management. Both Babel and TypeScript support the using and await using Syntax but require the symbols to be defined to work. This polyfill will only create the symbols if they don't exist yet and should be imported before one of the symbols is used. Node.js implemented its own polyfill in versions 18.18 and 20.4 until official support lands in v8.

A complete polyfill of the proposal is available through the disposablestack package.