mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
Add console.log
This commit is contained in:
parent
bfb3cd7a5c
commit
1a80bcb250
3 changed files with 41 additions and 4 deletions
17
main.ts
17
main.ts
|
@ -1,9 +1,22 @@
|
|||
//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) => {
|
||||
let msg = pb.Msg.decode(new Uint8Array(ab));
|
||||
V8Worker2.print("msg.argv", msg.argv);
|
||||
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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue