summaryrefslogtreecommitdiff
path: root/cli/js/runtime_main.ts
diff options
context:
space:
mode:
authorJohn Gardner <gardnerjohng@gmail.com>2020-06-11 13:00:29 +1000
committerGitHub <noreply@github.com>2020-06-10 23:00:29 -0400
commitca5b5ba530eccd1a4ed34bc475250daae489190a (patch)
treedaf31cb89b47943707ca0590174a4fd4750f006c /cli/js/runtime_main.ts
parenta1b37f177be848ce3c3248b6b835f8999e36afff (diff)
feat: Add Deno.mainModule (#6180)
Diffstat (limited to 'cli/js/runtime_main.ts')
-rw-r--r--cli/js/runtime_main.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/js/runtime_main.ts b/cli/js/runtime_main.ts
index 58405f673..25a6b0f93 100644
--- a/cli/js/runtime_main.ts
+++ b/cli/js/runtime_main.ts
@@ -9,6 +9,7 @@
import * as denoNs from "./deno.ts";
import * as denoUnstableNs from "./deno_unstable.ts";
+import { opMainModule } from "./ops/runtime.ts";
import { exit } from "./ops/os.ts";
import {
readOnly,
@@ -106,6 +107,7 @@ export function bootstrapMainRuntime(): void {
if (unstableFlag) {
Object.defineProperties(globalThis, unstableMethods);
Object.defineProperties(globalThis, unstableProperties);
+ Object.defineProperty(denoNs, "mainModule", getterOnly(opMainModule));
Object.assign(denoNs, denoUnstableNs);
}