-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Do not lowercase typeReference directive name #58525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
64 changes: 64 additions & 0 deletions
64
tests/baselines/reference/tsc/forceConsistentCasingInFileNames/with-type-ref-from-file.js
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
currentDirectory:: / useCaseSensitiveFileNames: false | ||
Input:: | ||
//// [/lib/lib.d.ts] | ||
/// <reference no-default-lib="true"/> | ||
interface Boolean {} | ||
interface Function {} | ||
interface CallableFunction {} | ||
interface NewableFunction {} | ||
interface IArguments {} | ||
interface Number { toExponential: any; } | ||
interface Object {} | ||
interface RegExp {} | ||
interface String { charAt: any; } | ||
interface Array<T> { length: number; [n: number]: T; } | ||
interface ReadonlyArray<T> {} | ||
declare const console: { log(msg: any): void; }; | ||
|
||
//// [/src/project/src/file2.d.ts] | ||
/// <reference types="./fileOne.d.ts"/> | ||
declare const y: c; | ||
|
||
|
||
//// [/src/project/src/fileOne.d.ts] | ||
declare class c { } | ||
|
||
//// [/src/project/src/tsconfig.json] | ||
{ } | ||
|
||
|
||
|
||
Output:: | ||
/lib/tsc -p /src/project/src --explainFiles --traceResolution | ||
File '/src/project/src/package.json' does not exist. | ||
File '/src/project/package.json' does not exist. | ||
File '/src/package.json' does not exist. | ||
File '/package.json' does not exist. | ||
======== Resolving type reference directive './fileOne.d.ts', containing file '/src/project/src/file2.d.ts', root directory '/src/project/src/node_modules/@types,/src/project/node_modules/@types,/src/node_modules/@types,/node_modules/@types'. ======== | ||
Resolving with primary search path '/src/project/src/node_modules/@types, /src/project/node_modules/@types, /src/node_modules/@types, /node_modules/@types'. | ||
Directory '/src/project/src/node_modules/@types' does not exist, skipping all lookups in it. | ||
Directory '/src/project/node_modules/@types' does not exist, skipping all lookups in it. | ||
Directory '/src/node_modules/@types' does not exist, skipping all lookups in it. | ||
Directory '/node_modules/@types' does not exist, skipping all lookups in it. | ||
Looking up in 'node_modules' folder, initial location '/src/project/src'. | ||
Loading module as file / folder, candidate module location '/src/project/src/fileOne.d.ts', target file types: Declaration. | ||
File name '/src/project/src/fileOne.d.ts' has a '.d.ts' extension - stripping it. | ||
File '/src/project/src/fileOne.d.ts' exists - use it as a name resolution result. | ||
Resolving real path for '/src/project/src/fileOne.d.ts', result '/src/project/src/fileOne.d.ts'. | ||
======== Type reference directive './fileOne.d.ts' was successfully resolved to '/src/project/src/fileOne.d.ts', primary: false. ======== | ||
File '/src/project/src/package.json' does not exist according to earlier cached lookups. | ||
File '/src/project/package.json' does not exist according to earlier cached lookups. | ||
File '/src/package.json' does not exist according to earlier cached lookups. | ||
File '/package.json' does not exist according to earlier cached lookups. | ||
File '/lib/package.json' does not exist. | ||
File '/package.json' does not exist according to earlier cached lookups. | ||
lib/lib.d.ts | ||
Default library for target 'es5' | ||
src/project/src/fileOne.d.ts | ||
Type library referenced via './fileOne.d.ts' from file 'src/project/src/file2.d.ts' | ||
Matched by default include pattern '**/*' | ||
src/project/src/file2.d.ts | ||
Matched by default include pattern '**/*' | ||
exitCode:: ExitStatus.Success | ||
|
||
|
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This stops showing as this because of how this is processed. When the
UpperCasePackage
typings are already found and are primary then they are not processed again and hence the file reason for this is never added. Thats a separate issue and am looking into updating that code as well but its not related to this change.it just stopped showing because before this the package name by auto type ref was "UpperCasePackage" while by type Ref was "uppercasepackage" which made two distinct entries and hence processed again.