diff options
Diffstat (limited to 'cli/js/ops/fs/symlink.ts')
-rw-r--r-- | cli/js/ops/fs/symlink.ts | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/cli/js/ops/fs/symlink.ts b/cli/js/ops/fs/symlink.ts index 64074ec2d..fde611b55 100644 --- a/cli/js/ops/fs/symlink.ts +++ b/cli/js/ops/fs/symlink.ts @@ -1,26 +1,22 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { sendSync, sendAsync } from "../dispatch_json.ts"; -import * as util from "../../util.ts"; -import { build } from "../../build.ts"; + +export type symlinkOptions = { + type: "file" | "dir"; +}; export function symlinkSync( oldpath: string, newpath: string, - type?: string + options?: symlinkOptions ): void { - if (build.os === "windows" && type) { - return util.notImplemented(); - } - sendSync("op_symlink", { oldpath, newpath }); + sendSync("op_symlink", { oldpath, newpath, options }); } export async function symlink( oldpath: string, newpath: string, - type?: string + options?: symlinkOptions ): Promise<void> { - if (build.os === "windows" && type) { - return util.notImplemented(); - } - await sendAsync("op_symlink", { oldpath, newpath }); + await sendAsync("op_symlink", { oldpath, newpath, options }); } |