mirror of
https://github.com/denoland/deno.git
synced 2025-08-31 15:57:53 +00:00
feat: disposable Deno resources (#20845)
This commit implements Symbol.dispose and Symbol.asyncDispose for the relevant resources. Closes #20839 --------- Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
1d19b1011b
commit
d42f154312
21 changed files with 342 additions and 35 deletions
|
@ -1138,6 +1138,7 @@ delete Object.prototype.__proto__;
|
|||
`${ASSETS_URL_PREFIX}${specifier}`,
|
||||
ts.ScriptTarget.ESNext,
|
||||
),
|
||||
`failed to load '${ASSETS_URL_PREFIX}${specifier}'`,
|
||||
);
|
||||
}
|
||||
// this helps ensure as much as possible is in memory that is re-usable
|
||||
|
@ -1148,7 +1149,10 @@ delete Object.prototype.__proto__;
|
|||
options: SNAPSHOT_COMPILE_OPTIONS,
|
||||
host,
|
||||
});
|
||||
assert(ts.getPreEmitDiagnostics(TS_SNAPSHOT_PROGRAM).length === 0);
|
||||
assert(
|
||||
ts.getPreEmitDiagnostics(TS_SNAPSHOT_PROGRAM).length === 0,
|
||||
"lib.d.ts files have errors",
|
||||
);
|
||||
|
||||
// remove this now that we don't need it anymore for warming up tsc
|
||||
sourceFileCache.delete(buildSpecifier);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue