1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-29 16:30:56 -05:00
denoland-deno/cli/tests/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");
}