1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-20 14:24:48 -05:00
denoland-deno/tests/specs/run/if_main/if_main.ts

7 lines
136 B
TypeScript
Raw Normal View History

if (import.meta.main) {
2019-02-12 21:14:02 -05:00
console.log("main");
} else {
console.log("import.meta.url", import.meta.url);
throw Error("not main");
}