diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-09-14 14:08:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 18:08:59 +0000 |
commit | 6dc8682b9acabea56fd69a25c28b6a8f95c2ce26 (patch) | |
tree | 944784e77b1008bd2bc3e2673927ddf6f896c5c6 /runtime/js/99_main.js | |
parent | e66d3c2c2e287879a757e12943a6d240981cb9e8 (diff) |
feat: explicit resource management in TypeScript (#20506)
This adds support for `using` and `await using` declarations in
TypeScript only. We need to wait for v8 to support it for this to work
in JS.
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r-- | runtime/js/99_main.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index fdd82862c..af5c1d40c 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -71,6 +71,11 @@ import { workerRuntimeGlobalProperties, } from "ext:runtime/98_global_scope.js"; +// deno-lint-ignore prefer-primordials +Symbol.dispose ??= Symbol("Symbol.dispose"); +// deno-lint-ignore prefer-primordials +Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose"); + let windowIsClosing = false; let globalThis_; |