diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-01-25 08:12:10 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 22:12:10 +0100 |
commit | fc176c4dea7463d587a1e921780cce55552e0c86 (patch) | |
tree | 88e996655b20e796571db38896d4db27fcfe54b7 /ext/net/lib.deno_net.d.ts | |
parent | 176118a0468c5b4f2117d18271d814000d4752b2 (diff) |
feat: deprecate `Deno.{Conn,TcpConn,TlsConn,UnixConn}.rid` (#22077)
For removal in Deno v2.
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'ext/net/lib.deno_net.d.ts')
-rw-r--r-- | ext/net/lib.deno_net.d.ts | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/ext/net/lib.deno_net.d.ts b/ext/net/lib.deno_net.d.ts index a7ed95bae..c6a771bc0 100644 --- a/ext/net/lib.deno_net.d.ts +++ b/ext/net/lib.deno_net.d.ts @@ -69,7 +69,12 @@ declare namespace Deno { readonly localAddr: Addr; /** The remote address of the connection. */ readonly remoteAddr: Addr; - /** The resource ID of the connection. */ + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.Conn} instance methods instead. + * {@linkcode Deno.Conn.rid} will be removed in Deno 2.0. + */ readonly rid: number; /** Shuts down (`shutdown(2)`) the write side of the connection. Most * callers should just use `close()`. */ @@ -103,6 +108,13 @@ declare namespace Deno { * not happened yet. Calling this method is optional; the TLS handshake * will be completed automatically as soon as data is sent or received. */ handshake(): Promise<TlsHandshakeInfo>; + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.TlsConn} instance methods instead. + * {@linkcode Deno.TlsConn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; } /** @category Network */ @@ -260,6 +272,13 @@ declare namespace Deno { setNoDelay(noDelay?: boolean): void; /** Enable/disable keep-alive functionality. */ setKeepAlive(keepAlive?: boolean): void; + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.Conn} instance methods instead. + * {@linkcode Deno.Conn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; } /** @category Network */ @@ -269,8 +288,15 @@ declare namespace Deno { } /** @category Network */ - // deno-lint-ignore no-empty-interface - export interface UnixConn extends Conn {} + export interface UnixConn extends Conn { + /** + * The resource ID of the connection. + * + * @deprecated Use {@linkcode Deno.UnixConn} instance methods instead. + * {@linkcode Deno.UnixConn.rid} will be removed in Deno 2.0. + */ + readonly rid: number; + } /** Connects to the hostname (default is "127.0.0.1") and port on the named * transport (default is "tcp"), and resolves to the connection (`Conn`). |