diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-26 00:36:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-26 00:36:03 +0100 |
commit | 9951506506ded805ff5eb09b52fb0235c0c3df79 (patch) | |
tree | 97be72e40de6c221d7db328433053bc17a6933ba /ext/node/polyfills/_fs/_fs_open.ts | |
parent | 0b0fb94ce2489da642cffd82e0498446d4a1fe1f (diff) |
fix(node): remove deprecation warnings (#22120)
Closes https://github.com/denoland/deno/issues/22116
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_open.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_open.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/node/polyfills/_fs/_fs_open.ts b/ext/node/polyfills/_fs/_fs_open.ts index a2b2917e6..9b4de4ce4 100644 --- a/ext/node/polyfills/_fs/_fs_open.ts +++ b/ext/node/polyfills/_fs/_fs_open.ts @@ -137,7 +137,7 @@ export function open( path as string, convertFlagAndModeToOptions(flags as openFlags, mode), ).then( - (file) => callback!(null, file.rid), + (file) => callback!(null, file[Symbol.for("Deno.internal.rid")]), (err) => (callback as (err: Error) => void)(err), ); } @@ -186,8 +186,10 @@ export function openSync( throw new Error(`EEXIST: file already exists, open '${path}'`); } - return Deno.openSync(path as string, convertFlagAndModeToOptions(flags, mode)) - .rid; + return Deno.openSync( + path as string, + convertFlagAndModeToOptions(flags, mode), + )[Symbol.for("Deno.internal.rid")]; } function existenceCheckRequired(flags: openFlags | number) { |