diff options
Diffstat (limited to 'cli/js/lib.deno_runtime.d.ts')
-rw-r--r-- | cli/js/lib.deno_runtime.d.ts | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/cli/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index 32914dabe..c4055bc35 100644 --- a/cli/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts @@ -1307,7 +1307,7 @@ declare namespace Deno { interface Addr { transport: Transport; - /** UNSTABLE: Address is unstable because inconsistent with DialOptions. */ + /** UNSTABLE: Address is unstable because inconsistent with ConnectOptions. */ address: string; } @@ -1419,15 +1419,13 @@ declare namespace Deno { */ export function listenTLS(options: ListenTLSOptions): Listener; - /** UNSTABLE rename to ConnectOptions */ - export interface DialOptions { + export interface ConnectOptions { port: number; hostname?: string; transport?: Transport; } - /** UNSTABLE: Rename to connect. - * + /** * Dial connects to the address on the named transport. * * @param options @@ -1440,25 +1438,23 @@ declare namespace Deno { * * Examples: * - * dial({ port: 80 }) - * dial({ hostname: "192.0.2.1", port: 80 }) - * dial({ hostname: "[2001:db8::1]", port: 80 }); - * dial({ hostname: "golang.org", port: 80, transport: "tcp" }) + * connect({ port: 80 }) + * connect({ hostname: "192.0.2.1", port: 80 }) + * connect({ hostname: "[2001:db8::1]", port: 80 }); + * connect({ hostname: "golang.org", port: 80, transport: "tcp" }) */ - export function dial(options: DialOptions): Promise<Conn>; + export function connect(options: ConnectOptions): Promise<Conn>; - /** UNSTABLE: rename to ConnectTLSOptions */ - export interface DialTLSOptions { + export interface ConnectTLSOptions { port: number; hostname?: string; certFile?: string; } - /** UNSTABLE: rename to connectTLS. - * - * dialTLS establishes a secure connection over TLS (transport layer security). + /** + * Establishes a secure connection over TLS (transport layer security). */ - export function dialTLS(options: DialTLSOptions): Promise<Conn>; + export function connectTLS(options: ConnectTLSOptions): Promise<Conn>; /** UNSTABLE: not sure if broken or not */ export interface Metrics { |