Skip to content

Commit 7f58b18

Browse files
committed
Test case
1 parent 7b7f6a7 commit 7f58b18

6 files changed

+57
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
error TS2688: Cannot find type definition file for 'phaser'.
2+
The file is in the program because:
3+
Entry point of type library 'phaser' specified in compilerOptions
4+
/a.ts(1,1): error TS2304: Cannot find name 'a'.
5+
6+
7+
!!! error TS2688: Cannot find type definition file for 'phaser'.
8+
!!! error TS2688: The file is in the program because:
9+
!!! error TS2688: Entry point of type library 'phaser' specified in compilerOptions
10+
==== /a.ts (1 errors) ====
11+
a;
12+
~
13+
!!! error TS2304: Cannot find name 'a'.
14+
15+
==== /node_modules/phaser/types/phaser.d.ts (0 errors) ====
16+
declare const a: number;
17+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//// [tests/cases/compiler/typeReferenceDirectiveWithTypeAsFile.ts] ////
2+
3+
//// [phaser.d.ts]
4+
declare const a: number;
5+
6+
//// [a.ts]
7+
a;
8+
9+
10+
//// [a.js]
11+
a;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
=== /a.ts ===
2+
3+
a;
4+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
"======== Resolving type reference directive 'phaser', containing file '/__inferred type names__.ts', root directory '/node_modules/phaser/types'. ========",
3+
"Resolving with primary search path '/node_modules/phaser/types'.",
4+
"Looking up in 'node_modules' folder, initial location '/'.",
5+
"File '/node_modules/phaser/package.json' does not exist.",
6+
"File '/node_modules/phaser.d.ts' does not exist.",
7+
"File '/node_modules/phaser/index.d.ts' does not exist.",
8+
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
9+
"======== Type reference directive 'phaser' was not resolved. ========"
10+
]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
=== /a.ts ===
2+
a;
3+
>a : any
4+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// @noImplicitReferences: true
2+
// @typeRoots: /node_modules/phaser/types
3+
// @types: phaser
4+
// @traceResolution: true
5+
// @currentDirectory: /
6+
7+
// @Filename: /node_modules/phaser/types/phaser.d.ts
8+
declare const a: number;
9+
10+
// @Filename: /a.ts
11+
a;

0 commit comments

Comments
 (0)