summaryrefslogtreecommitdiff
path: root/cli/js/remove.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-02-25 09:14:27 -0500
committerGitHub <noreply@github.com>2020-02-25 09:14:27 -0500
commit91b606aaae23bcb790b55adc5fe70a182a37d564 (patch)
tree16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/js/remove.ts
parent805992b14a65a6dbfb857dea6d9b657477de043d (diff)
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/js/remove.ts')
-rw-r--r--cli/js/remove.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/remove.ts b/cli/js/remove.ts
index f4b1bfe19..53ceb825b 100644
--- a/cli/js/remove.ts
+++ b/cli/js/remove.ts
@@ -1,6 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "./dispatch_json.ts";
-import * as dispatch from "./dispatch.ts";
export interface RemoveOption {
recursive?: boolean;
@@ -14,7 +13,7 @@ export interface RemoveOption {
* Deno.removeSync("/path/to/dir/or/file", {recursive: false});
*/
export function removeSync(path: string, options: RemoveOption = {}): void {
- sendSync(dispatch.OP_REMOVE, { path, recursive: !!options.recursive });
+ sendSync("op_remove", { path, recursive: !!options.recursive });
}
/** Removes the named file, directory or symlink. Would throw error if
@@ -28,5 +27,5 @@ export async function remove(
path: string,
options: RemoveOption = {}
): Promise<void> {
- await sendAsync(dispatch.OP_REMOVE, { path, recursive: !!options.recursive });
+ await sendAsync("op_remove", { path, recursive: !!options.recursive });
}