JS: Add baseUrl test

This commit is contained in:
Asger Feldthaus
2021-04-01 16:31:18 +01:00
parent c4ab6fb7b4
commit 564a6873f8
8 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1 @@
import { Foo } from "../B/src/foo";

View File

@@ -0,0 +1,3 @@
{
"include": ["."]
}

View File

@@ -0,0 +1,3 @@
import { Bar } from "lib/bar";
export class Foo {}

View File

@@ -0,0 +1,3 @@
import { Foo } from "foo";
export class Bar {}

View File

@@ -0,0 +1,6 @@
{
"include": ["."],
"compilerOptions": {
"baseUrl": "./src"
}
}

View File

@@ -0,0 +1,2 @@
| A/index.ts:1:1:1:35 | import ... c/foo"; | B/src/foo.ts:1:1:4:0 | <toplevel> |
| B/src/lib/bar.ts:1:1:1:26 | import ... "foo"; | B/src/foo.ts:1:1:4:0 | <toplevel> |

View File

@@ -0,0 +1,5 @@
import javascript
query Module getImportedModule(Import imprt) {
result = imprt.getImportedModule()
}

View File

@@ -0,0 +1 @@
{}