mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* rename proposal-explicit-resource-management to transform-explicit-resource-management * update library description * bump Babel/core version requirements to ^7.23.9 * add deprecation reminder * remove outdated reminders * update reminder date
16 lines
376 B
JavaScript
16 lines
376 B
JavaScript
let log = [];
|
|
let Symbol$dispose = Symbol.dispose || Symbol.for("Symbol.dispose");
|
|
try {
|
|
var _usingCtx = babelHelpers.usingCtx();
|
|
const foo = _usingCtx.u(babelHelpers.setFunctionName(class {
|
|
static [Symbol$dispose]() {
|
|
log.push(`${foo.name} is disposed`);
|
|
}
|
|
}, "foo"));
|
|
log.push(foo.name);
|
|
} catch (_) {
|
|
_usingCtx.e = _;
|
|
} finally {
|
|
_usingCtx.d();
|
|
}
|