summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.unstable.d.ts
diff options
context:
space:
mode:
authorAli Hasani <a.hassssani@gmail.com>2020-05-19 03:16:02 +0430
committerGitHub <noreply@github.com>2020-05-19 00:46:02 +0200
commit6072755eadb7342a409f43260e5a17b956703a1c (patch)
tree35ec9b10eddafdc2b0dacecc439aa8d9f785529a /cli/js/lib.deno.unstable.d.ts
parent88b24261ba467c20d4ef90224b07c19a71398f0f (diff)
Implement Deno.symlink() for windows (#5533)
Diffstat (limited to 'cli/js/lib.deno.unstable.d.ts')
-rw-r--r--cli/js/lib.deno.unstable.d.ts28
1 files changed, 12 insertions, 16 deletions
diff --git a/cli/js/lib.deno.unstable.d.ts b/cli/js/lib.deno.unstable.d.ts
index d27a3da9e..38260c8ff 100644
--- a/cli/js/lib.deno.unstable.d.ts
+++ b/cli/js/lib.deno.unstable.d.ts
@@ -41,48 +41,44 @@ declare namespace Deno {
* Requires `allow-read` and `allow-write` permissions. */
export function link(oldpath: string, newpath: string): Promise<void>;
- /** **UNSTABLE**: `type` argument type may be changed to `"dir" | "file"`.
- *
- * **UNSTABLE**: needs security review.
+ export type SymlinkOptions = {
+ type: "file" | "dir";
+ };
+
+ /** **UNSTABLE**: needs security review.
*
* Creates `newpath` as a symbolic link to `oldpath`.
*
- * The type argument can be set to `dir` or `file`. This argument is only
+ * The options.type parameter can be set to `file` or `dir`. This argument is only
* available on Windows and ignored on other platforms.
*
- * NOTE: This function is not yet implemented on Windows.
- *
* ```ts
* Deno.symlinkSync("old/name", "new/name");
* ```
*
- * Requires `allow-read` and `allow-write` permissions. */
+ * Requires `allow-write` permission. */
export function symlinkSync(
oldpath: string,
newpath: string,
- type?: string
+ options?: SymlinkOptions
): void;
- /** **UNSTABLE**: `type` argument may be changed to `"dir" | "file"`
- *
- * **UNSTABLE**: needs security review.
+ /** **UNSTABLE**: needs security review.
*
* Creates `newpath` as a symbolic link to `oldpath`.
*
- * The type argument can be set to `dir` or `file`. This argument is only
+ * The options.type parameter can be set to `file` or `dir`. This argument is only
* available on Windows and ignored on other platforms.
*
- * NOTE: This function is not yet implemented on Windows.
- *
* ```ts
* await Deno.symlink("old/name", "new/name");
* ```
*
- * Requires `allow-read` and `allow-write` permissions. */
+ * Requires `allow-write` permission. */
export function symlink(
oldpath: string,
newpath: string,
- type?: string
+ options?: SymlinkOptions
): Promise<void>;
/** **UNSTABLE** */