From aac0ad32bd589394316223f75e6f511331ff124c Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 24 Jan 2024 23:36:35 +1100 Subject: feat: deprecate `Deno.FsFile` constructor and `Deno.FsFile.rid` (#22072) --- cli/tsc/dts/lib.deno.ns.d.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'cli') diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index a388a9074..11780d011 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -2299,8 +2299,13 @@ declare namespace Deno { SeekerSync, Closer, Disposable { - /** The resource ID associated with the file instance. The resource ID - * should be considered an opaque reference to resource. */ + /** + * The resource ID associated with the file instance. The resource ID + * should be considered an opaque reference to resource. + * + * @deprecated Use {@linkcode Deno.FsFile} instance methods instead. + * {@linkcode Deno.FsFile.rid} will be removed in Deno 2.0. + */ readonly rid: number; /** A {@linkcode ReadableStream} instance representing to the byte contents * of the file. This makes it easy to interoperate with other web streams @@ -2330,9 +2335,15 @@ declare namespace Deno { * ``` */ readonly writable: WritableStream; - /** The constructor which takes a resource ID. Generally `FsFile` should + /** + * The constructor which takes a resource ID. Generally `FsFile` should * not be constructed directly. Instead use {@linkcode Deno.open} or - * {@linkcode Deno.openSync} to create a new instance of `FsFile`. */ + * {@linkcode Deno.openSync} to create a new instance of `FsFile`. + * + * @deprecated Use {@linkcode Deno.open} or {@linkcode Deno.openSync} + * instead. {@linkcode Deno.FsFile.constructor} will be removed in Deno + * 2.0. + */ constructor(rid: number); /** Write the contents of the array buffer (`p`) to the file. * -- cgit v1.2.3