summaryrefslogtreecommitdiff
path: root/cli/js/ops
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/ops')
-rw-r--r--cli/js/ops/fs/mkdir.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/js/ops/fs/mkdir.ts b/cli/js/ops/fs/mkdir.ts
index 4df33a29f..0bd088def 100644
--- a/cli/js/ops/fs/mkdir.ts
+++ b/cli/js/ops/fs/mkdir.ts
@@ -1,14 +1,16 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "../dispatch_json.ts";
+type MkdirArgs = { path: string; recursive: boolean; mode?: number };
+
// TODO(ry) The complexity in argument parsing is to support deprecated forms of
// mkdir and mkdirSync.
function mkdirArgs(
path: string,
optionsOrRecursive?: MkdirOptions | boolean,
mode?: number
-): { path: string; recursive: boolean; mode: number } {
- const args = { path, recursive: false, mode: 0o777 };
+): MkdirArgs {
+ const args: MkdirArgs = { path, recursive: false };
if (typeof optionsOrRecursive == "boolean") {
args.recursive = optionsOrRecursive;
if (mode) {
@@ -34,7 +36,7 @@ export interface MkdirOptions {
recursive?: boolean;
/** Permissions to use when creating the directory (defaults to `0o777`,
* before the process's umask).
- * Does nothing/raises on Windows. */
+ * Ignored on Windows. */
mode?: number;
}