diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-01-18 21:49:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-18 21:49:55 +0100 |
commit | 23e67eb5153bd26dbae471b27dc6a21a6d283b0b (patch) | |
tree | 781432ad02563f4c393a90dcb4300976dda731c0 /cli/js/lib.deno_runtime.d.ts | |
parent | 34b99fec8edcff7d3b667f273afea69df15e4d5e (diff) |
stabilize net Addr (#3709)
Co-authored-by: xiaoxintang <15707971810@163.com>
Diffstat (limited to 'cli/js/lib.deno_runtime.d.ts')
-rw-r--r-- | cli/js/lib.deno_runtime.d.ts | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/cli/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index c4055bc35..6e3e2384a 100644 --- a/cli/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts @@ -1307,8 +1307,8 @@ declare namespace Deno { interface Addr { transport: Transport; - /** UNSTABLE: Address is unstable because inconsistent with ConnectOptions. */ - address: string; + hostname: string; + port: number; } /** UNSTABLE: Maybe remove ShutdownMode entirely. */ @@ -1342,21 +1342,19 @@ declare namespace Deno { */ close(): void; /** Return the address of the `Listener`. */ - addr(): Addr; + addr: Addr; [Symbol.asyncIterator](): AsyncIterator<Conn>; } export interface Conn extends Reader, Writer, Closer { - /** UNSTABLE: return Addr? - * + /** * The local address of the connection. */ - localAddr: string; - /** UNSTABLE: return Addr? - * + localAddr: Addr; + /** * The remote address of the connection. */ - remoteAddr: string; + remoteAddr: Addr; /** The resource ID of the connection. */ rid: number; /** Shuts down (`shutdown(2)`) the reading side of the TCP connection. Most @@ -1426,7 +1424,7 @@ declare namespace Deno { } /** - * Dial connects to the address on the named transport. + * Connects to the address on the named transport. * * @param options * @param options.port The port to connect to. (Required.) |