summaryrefslogtreecommitdiff
path: root/js/copy_file.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-08-21 20:42:48 -0400
committerGitHub <noreply@github.com>2019-08-21 20:42:48 -0400
commitbdc97b3976786bb744a27e59b0f4f28554a682df (patch)
treebf4635ad903de542c10620e95adb72eee03d9204 /js/copy_file.ts
parentb764d1b8ffc4bf5e2ab89bdbd978d708a6da0f24 (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/copy_file.ts')
-rw-r--r--js/copy_file.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/js/copy_file.ts b/js/copy_file.ts
index 5cab6d579..4c62ed1b0 100644
--- a/js/copy_file.ts
+++ b/js/copy_file.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";
function req(
from: string,
@@ -24,7 +22,7 @@ function req(
* Deno.copyFileSync("from.txt", "to.txt");
*/
export function copyFileSync(from: string, to: string): void {
- dispatch.sendSync(...req(from, to));
+ sendSync(...req(from, to));
}
/** Copies the contents of a file to another by name.
@@ -38,5 +36,5 @@ export function copyFileSync(from: string, to: string): void {
* await Deno.copyFile("from.txt", "to.txt");
*/
export async function copyFile(from: string, to: string): Promise<void> {
- await dispatch.sendAsync(...req(from, to));
+ await sendAsync(...req(from, to));
}