summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno_runtime.d.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-01-18 18:35:12 +0100
committerGitHub <noreply@github.com>2020-01-18 18:35:12 +0100
commit34b99fec8edcff7d3b667f273afea69df15e4d5e (patch)
tree108ea1800b83641023baede5bf9bceba8238f203 /cli/js/lib.deno_runtime.d.ts
parent4f1fa82d1d0458170039d4809c3879993659e560 (diff)
rename dial to connect and dialTLS to connectTLS (#3710)
Diffstat (limited to 'cli/js/lib.deno_runtime.d.ts')
-rw-r--r--cli/js/lib.deno_runtime.d.ts28
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 {