diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-08-21 20:42:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-21 20:42:48 -0400 |
commit | bdc97b3976786bb744a27e59b0f4f28554a682df (patch) | |
tree | bf4635ad903de542c10620e95adb72eee03d9204 /js/make_temp_dir.ts | |
parent | b764d1b8ffc4bf5e2ab89bdbd978d708a6da0f24 (diff) |
Organize dispatch a bit (#2796)
Just some clean up reorganization around flatbuffer/minimal dispatch
code. This is prep for adding a JSON dispatcher.
Diffstat (limited to 'js/make_temp_dir.ts')
-rw-r--r-- | js/make_temp_dir.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/js/make_temp_dir.ts b/js/make_temp_dir.ts index 8a3098b9e..f83f7fb60 100644 --- a/js/make_temp_dir.ts +++ b/js/make_temp_dir.ts @@ -1,7 +1,5 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -import * as msg from "gen/cli/msg_generated"; -import * as flatbuffers from "./flatbuffers"; -import * as dispatch from "./dispatch"; +import { sendSync, sendAsync, msg, flatbuffers } from "./dispatch_flatbuffers"; import { assert } from "./util"; export interface MakeTempDirOptions { @@ -44,7 +42,7 @@ function res(baseRes: null | msg.Base): string { * const tempDirName1 = Deno.makeTempDirSync({ prefix: 'my_temp' }); */ export function makeTempDirSync(options: MakeTempDirOptions = {}): string { - return res(dispatch.sendSync(...req(options))); + return res(sendSync(...req(options))); } /** makeTempDir creates a new temporary directory in the directory `dir`, its @@ -61,5 +59,5 @@ export function makeTempDirSync(options: MakeTempDirOptions = {}): string { export async function makeTempDir( options: MakeTempDirOptions = {} ): Promise<string> { - return res(await dispatch.sendAsync(...req(options))); + return res(await sendAsync(...req(options))); } |