mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
BREAKING: address renamed to path in UnixAddr UnixConnectOptions UnixListenOptions (#4959)
This commit is contained in:
parent
e0ca60e770
commit
47c2f034e9
6 changed files with 38 additions and 38 deletions
12
cli/js/lib.deno.ns.d.ts
vendored
12
cli/js/lib.deno.ns.d.ts
vendored
|
@ -1829,7 +1829,7 @@ declare namespace Deno {
|
|||
|
||||
export interface UnixAddr {
|
||||
transport: "unix" | "unixpacket";
|
||||
address: string;
|
||||
path: string;
|
||||
}
|
||||
|
||||
export type Addr = NetAddr | UnixAddr;
|
||||
|
@ -1917,7 +1917,7 @@ declare namespace Deno {
|
|||
|
||||
export interface UnixListenOptions {
|
||||
/** A Path to the Unix Socket. */
|
||||
address: string;
|
||||
path: string;
|
||||
}
|
||||
/** **UNSTABLE**: new API, yet to be vetted.
|
||||
*
|
||||
|
@ -1936,7 +1936,7 @@ declare namespace Deno {
|
|||
*
|
||||
* Listen announces on the local transport address.
|
||||
*
|
||||
* const listener = Deno.listen({ address: "/foo/bar.sock", transport: "unix" })
|
||||
* const listener = Deno.listen({ path: "/foo/bar.sock", transport: "unix" })
|
||||
*
|
||||
* Requires `allow-read` and `allow-write` permission. */
|
||||
export function listen(
|
||||
|
@ -1957,7 +1957,7 @@ declare namespace Deno {
|
|||
*
|
||||
* Listen announces on the local transport address.
|
||||
*
|
||||
* const listener = Deno.listen({ address: "/foo/bar.sock", transport: "unixpacket" })
|
||||
* const listener = Deno.listen({ path: "/foo/bar.sock", transport: "unixpacket" })
|
||||
*
|
||||
* Requires `allow-read` and `allow-write` permission. */
|
||||
export function listen(
|
||||
|
@ -1992,7 +1992,7 @@ declare namespace Deno {
|
|||
|
||||
export interface UnixConnectOptions {
|
||||
transport: "unix";
|
||||
address: string;
|
||||
path: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2003,7 +2003,7 @@ declare namespace Deno {
|
|||
* const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 });
|
||||
* const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 });
|
||||
* const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" });
|
||||
* const conn5 = await Deno.connect({ address: "/foo/bar.sock", transport: "unix" });
|
||||
* const conn5 = await Deno.connect({ path: "/foo/bar.sock", transport: "unix" });
|
||||
*
|
||||
* Requires `allow-net` permission for "tcp" and `allow-read` for unix. */
|
||||
export function connect(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue