Clean up how we use opIds (#4118)

This commit is contained in:
Ryan Dahl 2020-02-25 09:14:27 -05:00 committed by GitHub
parent 805992b14a
commit 91b606aaae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 367 additions and 589 deletions

View file

@ -1,5 +1,4 @@
import { sendSync } from "./dispatch_json.ts";
import { OP_OPEN_PLUGIN } from "./dispatch.ts";
import { core } from "./core.ts";
export interface AsyncHandler {
@ -59,7 +58,7 @@ interface OpenPluginResponse {
}
export function openPlugin(filename: string): Plugin {
const response: OpenPluginResponse = sendSync(OP_OPEN_PLUGIN, {
const response: OpenPluginResponse = sendSync("op_open_plugin", {
filename
});
return new PluginImpl(response.rid, response.ops);