mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
Add testdata/005_more_imports.ts
This commit is contained in:
parent
8f0e242f4b
commit
ee9cfb5a60
4 changed files with 34 additions and 0 deletions
11
testdata/005_more_imports.ts
vendored
Normal file
11
testdata/005_more_imports.ts
vendored
Normal 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
1
testdata/005_more_imports.ts.out
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Hello
|
13
testdata/subdir/mod1.ts
vendored
Normal file
13
testdata/subdir/mod1.ts
vendored
Normal 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
9
testdata/subdir/subdir2/mod2.ts
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
import { printHello } from "../print_hello.ts";
|
||||||
|
|
||||||
|
export function returnsFoo(): string {
|
||||||
|
return "Foo";
|
||||||
|
}
|
||||||
|
|
||||||
|
export function printHello2(): void {
|
||||||
|
printHello();
|
||||||
|
}
|
Loading…
Reference in a new issue