summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-01-22 10:20:59 +1100
committerGitHub <noreply@github.com>2024-01-22 00:20:59 +0100
commit983c745d4f385594638c42c107dca7d55afd0731 (patch)
tree2c184d26ea3344b82543117d25bb99e49ba876e9 /tools
parent568337f3f43ef050cbbd95995f94e39663530ab4 (diff)
chore: use `FsFile[Symbol.dispose]()` (#22007)
This change takes advantage of explicit resources management for `FsFile` instances and tweaks documentation to encourage the use of it. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/node_compat/setup.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/node_compat/setup.ts b/tools/node_compat/setup.ts
index 867953ef9..2844cffdd 100755
--- a/tools/node_compat/setup.ts
+++ b/tools/node_compat/setup.ts
@@ -65,7 +65,7 @@ function getDenoTests() {
}
async function updateToDo() {
- const file = await Deno.open(new URL("./TODO.md", import.meta.url), {
+ using file = await Deno.open(new URL("./TODO.md", import.meta.url), {
write: true,
create: true,
truncate: true,
@@ -88,7 +88,6 @@ Total: ${missingTests.length}
),
);
}
- file.close();
}
async function clearTests() {