diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/diagnostics.rs | 2 | ||||
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 21 | ||||
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 22 |
3 files changed, 21 insertions, 24 deletions
diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs index 1da2f277e..5b2ce3641 100644 --- a/cli/diagnostics.rs +++ b/cli/diagnostics.rs @@ -44,8 +44,6 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[ "ftruncateSync", "hostname", "kill", - "link", - "linkSync", "listen", "listenDatagram", "loadavg", diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 15088934a..aa10ce3af 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -265,6 +265,27 @@ declare namespace Deno { */ export function cwd(): string; + /** + * Synchronously creates `newpath` as a hard link to `oldpath`. + * + * ```ts + * Deno.linkSync("old/name", "new/name"); + * ``` + * + * Requires `allow-read` and `allow-write` permissions. */ + export function linkSync(oldpath: string, newpath: string): void; + + /** + * + * Creates `newpath` as a hard link to `oldpath`. + * + * ```ts + * await Deno.link("old/name", "new/name"); + * ``` + * + * Requires `allow-read` and `allow-write` permissions. */ + export function link(oldpath: string, newpath: string): Promise<void>; + export enum SeekMode { Start = 0, Current = 1, diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 8623e73d4..5007d657d 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -21,28 +21,6 @@ declare namespace Deno { */ export function umask(mask?: number): number; - /** **UNSTABLE**: This API needs a security review. - * - * Synchronously creates `newpath` as a hard link to `oldpath`. - * - * ```ts - * Deno.linkSync("old/name", "new/name"); - * ``` - * - * Requires `allow-read` and `allow-write` permissions. */ - export function linkSync(oldpath: string, newpath: string): void; - - /** **UNSTABLE**: This API needs a security review. - * - * Creates `newpath` as a hard link to `oldpath`. - * - * ```ts - * await Deno.link("old/name", "new/name"); - * ``` - * - * Requires `allow-read` and `allow-write` permissions. */ - export function link(oldpath: string, newpath: string): Promise<void>; - /** **UNSTABLE**: New API, yet to be vetted. * * Gets the size of the console as columns/rows. |