1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-11 01:58:05 -05:00
denoland-deno/tests/testdata/run/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");
}