summaryrefslogtreecommitdiff
path: root/cli/js/remove.ts
diff options
context:
space:
mode:
authordubiousjim <dubiousjim@gmail.com>2020-03-02 15:24:42 -0500
committerGitHub <noreply@github.com>2020-03-02 21:24:42 +0100
commita3c3a56ff71c325ea4807548484023c95ffdcd77 (patch)
treeb86091ab954429ed538222957c08588aa3718a97 /cli/js/remove.ts
parentff5bba3be833b0062b3991b96272c0047c18b62e (diff)
Rename Option -> Options (#4226)
* Rename MkdirOption interface to MkdirOptions It was hard to remember which Options interfaces were spelled in the singular and which in the plural (and anyway this one contained two options). Also added MkdirOptions to cli/js/deno.ts. All the analogous interfaces were exported there. * Rename RemoveOption interface to RemoveOptions This was the last remaining Option interface spelled in the singular. Easier to remember if they're all Option**s**; plus we may want to add extra options here later.
Diffstat (limited to 'cli/js/remove.ts')
-rw-r--r--cli/js/remove.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/js/remove.ts b/cli/js/remove.ts
index 4d15cf241..89e5850ab 100644
--- a/cli/js/remove.ts
+++ b/cli/js/remove.ts
@@ -1,7 +1,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "./dispatch_json.ts";
-export interface RemoveOption {
+export interface RemoveOptions {
/** Defaults to `false`. If set to `true`, path will be removed even if
* it's a non-empty directory. */
recursive?: boolean;
@@ -14,7 +14,7 @@ export interface RemoveOption {
* Deno.removeSync("/path/to/dir/or/file", { recursive: false });
*
* Requires `allow-write` permission. */
-export function removeSync(path: string, options: RemoveOption = {}): void {
+export function removeSync(path: string, options: RemoveOptions = {}): void {
sendSync("op_remove", { path, recursive: !!options.recursive });
}
@@ -27,7 +27,7 @@ export function removeSync(path: string, options: RemoveOption = {}): void {
* Requires `allow-write` permission. */
export async function remove(
path: string,
- options: RemoveOption = {}
+ options: RemoveOptions = {}
): Promise<void> {
await sendAsync("op_remove", { path, recursive: !!options.recursive });
}