"Fossies" - the Fresh Open Source Software Archive

Member "deno-1.34.2/cli/tests/testdata/run/013_dynamic_import.ts" (9 Jun 2023, 267 Bytes) of package /linux/www/deno-1.34.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 (async () => {
    2   const { returnsHi, returnsFoo2, printHello3 } = await import(
    3     "../subdir/mod1.ts"
    4   );
    5 
    6   printHello3();
    7 
    8   if (returnsHi() !== "Hi") {
    9     throw Error("Unexpected");
   10   }
   11 
   12   if (returnsFoo2() !== "Foo") {
   13     throw Error("Unexpected");
   14   }
   15 })();