-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve typeReferenceDirective as fileOrDirectory instead of just dir…
…ectory Fixes #37708 Bug 2 part of the issue
- Loading branch information
1 parent
85bce61
commit 892f214
Showing
5 changed files
with
23 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
tests/baselines/reference/typeReferenceDirectiveWithTypeAsFile.errors.txt
This file was deleted.
Oops, something went wrong.
8 changes: 6 additions & 2 deletions
8
tests/baselines/reference/typeReferenceDirectiveWithTypeAsFile.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
=== /a.ts === | ||
a; | ||
No type information for this code. | ||
No type information for this code. | ||
>a : Symbol(a, Decl(phaser.d.ts, 0, 13)) | ||
|
||
=== /node_modules/phaser/types/phaser.d.ts === | ||
declare const a: number; | ||
>a : Symbol(a, Decl(phaser.d.ts, 0, 13)) | ||
|
9 changes: 4 additions & 5 deletions
9
tests/baselines/reference/typeReferenceDirectiveWithTypeAsFile.trace.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
[ | ||
"======== Resolving type reference directive 'phaser', containing file '/__inferred type names__.ts', root directory '/node_modules/phaser/types'. ========", | ||
"Resolving with primary search path '/node_modules/phaser/types'.", | ||
"Looking up in 'node_modules' folder, initial location '/'.", | ||
"Loading module as file / folder, candidate module location '/node_modules/phaser/types/phaser', target file type 'DtsOnly'.", | ||
"File '/node_modules/phaser/types/phaser.d.ts' exist - use it as a name resolution result.", | ||
"File '/node_modules/phaser/package.json' does not exist.", | ||
"File '/node_modules/phaser.d.ts' does not exist.", | ||
"File '/node_modules/phaser/index.d.ts' does not exist.", | ||
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.", | ||
"======== Type reference directive 'phaser' was not resolved. ========" | ||
"Resolving real path for '/node_modules/phaser/types/phaser.d.ts', result '/node_modules/phaser/types/phaser.d.ts'.", | ||
"======== Type reference directive 'phaser' was successfully resolved to '/node_modules/phaser/types/phaser.d.ts', primary: true. ========" | ||
] |
6 changes: 5 additions & 1 deletion
6
tests/baselines/reference/typeReferenceDirectiveWithTypeAsFile.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
=== /a.ts === | ||
a; | ||
>a : any | ||
>a : number | ||
|
||
=== /node_modules/phaser/types/phaser.d.ts === | ||
declare const a: number; | ||
>a : number | ||
|