summaryrefslogtreecommitdiff
path: root/deno2/js/main.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-06-13 15:01:21 +0200
committerRyan Dahl <ry@tinyclouds.org>2018-06-13 15:01:21 +0200
commit5c7ba22f2242930ad09f011eaea12a59153e294f (patch)
tree6edb4e52147fe81b76e340028fa9cc67e4f058e7 /deno2/js/main.ts
parent69868c2b0e4372e6d7e49821caca41d372686eea (diff)
parentbb6222c91872695cbe98aa2a75166265f52cec2e (diff)
Merge branch 'deno2'
Diffstat (limited to 'deno2/js/main.ts')
-rw-r--r--deno2/js/main.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/deno2/js/main.ts b/deno2/js/main.ts
new file mode 100644
index 000000000..301482ea6
--- /dev/null
+++ b/deno2/js/main.ts
@@ -0,0 +1,14 @@
+/// <reference path="deno.d.ts" />
+import { main as pb } from "./msg.pb";
+import * as ts from "typescript";
+
+const globalEval = eval;
+const window = globalEval("this");
+window["denoMain"] = () => {
+ denoPrint("Hello world");
+ const msg = pb.Msg.fromObject({});
+ denoPrint(`msg.command: ${msg.command}`);
+ denoPrint(`ts.version: ${ts.version}`);
+ denoPrint("Hello world from foo");
+ return "foo";
+};