mirror of
https://github.com/denoland/deno.git
synced 2025-10-03 15:44:36 +00:00
rename dial to connect and dialTLS to connectTLS (#3710)
This commit is contained in:
parent
4f1fa82d1d
commit
34b99fec8e
14 changed files with 61 additions and 72 deletions
28
cli/js/lib.deno_runtime.d.ts
vendored
28
cli/js/lib.deno_runtime.d.ts
vendored
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue