summaryrefslogtreecommitdiff
path: root/cli/js/make_temp.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/make_temp.ts')
-rw-r--r--cli/js/make_temp.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/js/make_temp.ts b/cli/js/make_temp.ts
index 8b15ab184..7b0038388 100644
--- a/cli/js/make_temp.ts
+++ b/cli/js/make_temp.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 MakeTempOptions {
dir?: string;
@@ -14,7 +13,7 @@ export interface MakeTempOptions {
* const tempDirName1 = Deno.makeTempDirSync({ prefix: 'my_temp' });
*/
export function makeTempDirSync(options: MakeTempOptions = {}): string {
- return sendSync(dispatch.OP_MAKE_TEMP_DIR, options);
+ return sendSync("op_make_temp_dir", options);
}
/** makeTempDir creates a new temporary directory in the directory `dir`, its
@@ -31,7 +30,7 @@ export function makeTempDirSync(options: MakeTempOptions = {}): string {
export async function makeTempDir(
options: MakeTempOptions = {}
): Promise<string> {
- return await sendAsync(dispatch.OP_MAKE_TEMP_DIR, options);
+ return await sendAsync("op_make_temp_dir", options);
}
/** makeTempFileSync is the synchronous version of `makeTempFile`.
@@ -40,7 +39,7 @@ export async function makeTempDir(
* const tempFileName1 = Deno.makeTempFileSync({ prefix: 'my_temp' });
*/
export function makeTempFileSync(options: MakeTempOptions = {}): string {
- return sendSync(dispatch.OP_MAKE_TEMP_FILE, options);
+ return sendSync("op_make_temp_file", options);
}
/** makeTempFile creates a new temporary file in the directory `dir`, its
@@ -57,5 +56,5 @@ export function makeTempFileSync(options: MakeTempOptions = {}): string {
export async function makeTempFile(
options: MakeTempOptions = {}
): Promise<string> {
- return await sendAsync(dispatch.OP_MAKE_TEMP_FILE, options);
+ return await sendAsync("op_make_temp_file", options);
}