summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2021-02-26 08:13:48 +0800
committerGitHub <noreply@github.com>2021-02-26 01:13:48 +0100
commit2ac7798a20f34d9e774299c6e538aed96dfb7257 (patch)
treeaa1725d7fdb42f980f14dd8ff35d329c58a2b570 /cli/dts/lib.deno.ns.d.ts
parente516e4d1d5bd12182a3f541e1e6e000639dbc5da (diff)
feat(runtime): stabilize Deno.symlink and Deno.symlinkSync (#9226)
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r--cli/dts/lib.deno.ns.d.ts38
1 files changed, 38 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index aa10ce3af..cbbf44c84 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -2273,4 +2273,42 @@ declare namespace Deno {
/** The URL of the entrypoint module entered from the command-line. */
export const mainModule: string;
+
+ export type SymlinkOptions = {
+ type: "file" | "dir";
+ };
+
+ /**
+ * Creates `newpath` as a symbolic link to `oldpath`.
+ *
+ * The options.type parameter can be set to `file` or `dir`. This argument is only
+ * available on Windows and ignored on other platforms.
+ *
+ * ```ts
+ * Deno.symlinkSync("old/name", "new/name");
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function symlinkSync(
+ oldpath: string,
+ newpath: string,
+ options?: SymlinkOptions,
+ ): void;
+
+ /**
+ * Creates `newpath` as a symbolic link to `oldpath`.
+ *
+ * The options.type parameter can be set to `file` or `dir`. This argument is only
+ * available on Windows and ignored on other platforms.
+ *
+ * ```ts
+ * await Deno.symlink("old/name", "new/name");
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function symlink(
+ oldpath: string,
+ newpath: string,
+ options?: SymlinkOptions,
+ ): Promise<void>;
}