Version: Deno 2.5.0
The Deno implementation of the Node file system API seems to require a callback.
But the callback should be optional according to the Node documentation:
https://nodejs.org/api/fs.html#fsclosefd-callback
Minimal example:
import * as fs from "node:fs";
const fd = fs.openSync("some_file", "r");
fs.close(fd);
Exception thrown:
error: Uncaught TypeError: callback is not a function
at ext:deno_node/_fs/_fs_close.ts:17:5
at callback (ext:deno_web/02_timers.js:58:7)
at eventLoopTick (ext:core/01_core.js:214:13)
Version: Deno 2.5.0
The Deno implementation of the Node file system API seems to require a callback.
But the callback should be optional according to the Node documentation:
https://nodejs.org/api/fs.html#fsclosefd-callback
Minimal example:
Exception thrown: