1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 16:49:18 -05:00

Add testdata/005_more_imports.ts

This commit is contained in:
Ryan Dahl 2018-05-18 11:59:05 -04:00
parent 8f0e242f4b
commit ee9cfb5a60
4 changed files with 34 additions and 0 deletions

11
testdata/005_more_imports.ts vendored Normal file
View file

@ -0,0 +1,11 @@
import { returnsHi, returnsFoo2, printHello3 } from "./subdir/mod1.ts";
printHello3();
if (returnsHi() !== "Hi") {
throw Error("Unexpected");
}
if (returnsFoo2() !== "Foo") {
throw Error("Unexpected");
}

1
testdata/005_more_imports.ts.out vendored Normal file
View file

@ -0,0 +1 @@
Hello

13
testdata/subdir/mod1.ts vendored Normal file
View file

@ -0,0 +1,13 @@
import { returnsFoo, printHello2 } from "./subdir2/mod2.ts";
export function returnsHi(): string {
return "Hi";
}
export function returnsFoo2(): string {
return returnsFoo();
}
export function printHello3(): void {
printHello2();
}

9
testdata/subdir/subdir2/mod2.ts vendored Normal file
View file

@ -0,0 +1,9 @@
import { printHello } from "../print_hello.ts";
export function returnsFoo(): string {
return "Foo";
}
export function printHello2(): void {
printHello();
}