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/resources.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/resources.ts')
-rw-r--r-- | js/resources.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/js/resources.ts b/js/resources.ts index 7ccc79c4d..49093fab1 100644 --- a/js/resources.ts +++ b/js/resources.ts @@ -1,8 +1,6 @@ // 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 { assert } from "./util"; -import * as dispatch from "./dispatch"; +import { sendSync, msg, flatbuffers } from "./dispatch_flatbuffers"; export interface ResourceMap { [rid: number]: string; @@ -14,7 +12,7 @@ export interface ResourceMap { export function resources(): ResourceMap { const builder = flatbuffers.createBuilder(); const inner = msg.Resource.createResource(builder, 0, 0); - const baseRes = dispatch.sendSync(builder, msg.Any.Resources, inner); + const baseRes = sendSync(builder, msg.Any.Resources, inner); assert(baseRes !== null); assert(msg.Any.ResourcesRes === baseRes!.innerType()); const res = new msg.ResourcesRes(); |