mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
22 lines
458 B
TypeScript
22 lines
458 B
TypeScript
//import * as ts from "typescript";
|
|
import { main as pb } from "./msg.pb"
|
|
import "./util";
|
|
|
|
|
|
function load(argv: string[]): void {
|
|
console.log("Load argv", argv);
|
|
}
|
|
|
|
V8Worker2.recv((ab: ArrayBuffer) => {
|
|
const msg = pb.Msg.decode(new Uint8Array(ab));
|
|
switch (msg.kind) {
|
|
case pb.Msg.MsgKind.LOAD:
|
|
load(msg.argv);
|
|
break;
|
|
default:
|
|
console.log("Unknown message", msg);
|
|
break;
|
|
}
|
|
});
|
|
|
|
V8Worker2.print("Hello");
|