Remove core/plugin.rs (#4824)

This simplifies the plugin interface in order to deliver op crates with a similar API
This commit is contained in:
Ryan Dahl 2020-04-20 10:27:15 -04:00 committed by GitHub
parent 437e35ca52
commit 6e5f3453f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 53 additions and 190 deletions

View file

@ -1,12 +1,6 @@
import { sendSync } from "./dispatch_json.ts";
interface OpenPluginResponse {
rid: number;
ops: {
[name: string]: number;
};
}
export function openPlugin(filename: string): OpenPluginResponse {
return sendSync("op_open_plugin", { filename });
export function openPlugin(filename: string): number {
const rid = sendSync("op_open_plugin", { filename });
return rid;
}