summaryrefslogtreecommitdiff
path: root/cli/js/plugins.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-03-09 15:18:02 +0100
committerGitHub <noreply@github.com>2020-03-09 15:18:02 +0100
commit886f330ec8110a3eb72feb14353f353962179d2e (patch)
treef6b458afac30a18d5120396bed9b1e63ae6d8529 /cli/js/plugins.ts
parent1b6fc87b7188118896f797e5f0dab309775def71 (diff)
reorg: move JS ops implementations to cli/js/ops/, part 2 (#4283)
Following JS ops were moved to separate files in cli/js/ops directory: - io - process - worker_host - web_worker - plugins - timers - signal - permissions
Diffstat (limited to 'cli/js/plugins.ts')
-rw-r--r--cli/js/plugins.ts13
1 files changed, 2 insertions, 11 deletions
diff --git a/cli/js/plugins.ts b/cli/js/plugins.ts
index 2dbee4c74..061193b4f 100644
--- a/cli/js/plugins.ts
+++ b/cli/js/plugins.ts
@@ -1,4 +1,4 @@
-import { sendSync } from "./ops/dispatch_json.ts";
+import { openPlugin as openPluginOp } from "./ops/plugins.ts";
import { core } from "./core.ts";
export interface AsyncHandler {
@@ -50,16 +50,7 @@ class PluginImpl implements Plugin {
}
}
-interface OpenPluginResponse {
- rid: number;
- ops: {
- [name: string]: number;
- };
-}
-
export function openPlugin(filename: string): Plugin {
- const response: OpenPluginResponse = sendSync("op_open_plugin", {
- filename
- });
+ const response = openPluginOp(filename);
return new PluginImpl(response.rid, response.ops);
}