summaryrefslogtreecommitdiff
path: root/tests/013_dynamic_import.ts
blob: 20dc508dbd00eaae3d56e8af428a77a61617131b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(async (): Promise<void> => {
  const {
    returnsHi,
    returnsFoo2,
    printHello3
  } = await import("./subdir/mod1.ts");

  printHello3();

  if (returnsHi() !== "Hi") {
    throw Error("Unexpected");
  }

  if (returnsFoo2() !== "Foo") {
    throw Error("Unexpected");
  }
})();