Skip to content

Commit d4786ad

Browse files
author
Andy Hanson
committed
Add test with a referenced dts file
1 parent 07630e9 commit d4786ad

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Test that importing a file from `node_modules` does not affect calculation of the common source directory.
2+
// @noImplicitReferences: true
3+
// @moduleResolution: node
4+
// @fullEmitPaths: true
5+
6+
// @filename: /app/lib/bar.d.ts
7+
declare const y: number;
8+
9+
// @filename: /app/src/index.ts
10+
/// <reference path="../lib/bar.d.ts" />
11+
export const x = y;
12+
13+
// @filename: /app/tsconfig.json
14+
{
15+
"compilerOptions": {
16+
"outDir": "bin",
17+
"sourceMap": true,
18+
"mapRoot": "myMapRoot",
19+
"sourceRoot": "mySourceRoot",
20+
"declaration": true
21+
}
22+
}

0 commit comments

Comments
 (0)