diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-03-11 15:49:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-11 15:49:53 +0100 |
commit | 2d1b39bef339edb19ae6be5fb2099e685cee93bb (patch) | |
tree | 4e1664f50e079e2f258d86cb0e4a1160fb6b3d7b /cli/js/dispatch.ts | |
parent | 99a0c6df79b903e4fe72ce066787039bdede3868 (diff) |
reorg: remove dispatch.ts, move signals, factor out web utils (#4316)
- moves signal definition from "cli/js/process.ts" to "cli/js/signals.ts"
- removes "cli/js/dispatch.ts"
- removes "cli/js/types.ts"
- moves web specific utilities to "cli/js/web/util.ts"
Diffstat (limited to 'cli/js/dispatch.ts')
-rw-r--r-- | cli/js/dispatch.ts | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/cli/js/dispatch.ts b/cli/js/dispatch.ts deleted file mode 100644 index f3c92dbc6..000000000 --- a/cli/js/dispatch.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import * as minimal from "./ops/dispatch_minimal.ts"; -import * as json from "./ops/dispatch_json.ts"; -import { AsyncHandler } from "./plugins.ts"; - -const PLUGIN_ASYNC_HANDLER_MAP: Map<number, AsyncHandler> = new Map(); - -export function setPluginAsyncHandler( - opId: number, - handler: AsyncHandler -): void { - PLUGIN_ASYNC_HANDLER_MAP.set(opId, handler); -} - -export function getAsyncHandler(opName: string): (msg: Uint8Array) => void { - switch (opName) { - case "op_write": - case "op_read": - return minimal.asyncMsgFromRust; - default: - return json.asyncMsgFromRust; - } -} |