-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
noErrorTruncation affects semantic diagnostics (#36306)
- Loading branch information
1 parent
ef5573b
commit 0276e7f
Showing
3 changed files
with
151 additions
and
0 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
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
117 changes: 117 additions & 0 deletions
117
...elines/reference/tscWatch/programUpdates/updates-errors-when-noErrorTruncation-changes.js
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 |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/a/lib/tsc.js -w | ||
//// [/user/username/projects/myproject/a.ts] | ||
declare var v: { | ||
reallyLongPropertyName1: string | number | boolean | object | symbol | bigint; | ||
reallyLongPropertyName2: string | number | boolean | object | symbol | bigint; | ||
reallyLongPropertyName3: string | number | boolean | object | symbol | bigint; | ||
reallyLongPropertyName4: string | number | boolean | object | symbol | bigint; | ||
reallyLongPropertyName5: string | number | boolean | object | symbol | bigint; | ||
reallyLongPropertyName6: string | number | boolean | object | symbol | bigint; | ||
reallyLongPropertyName7: string | number | boolean | object | symbol | bigint; | ||
}; | ||
v === 'foo'; | ||
|
||
//// [/user/username/projects/myproject/tsconfig.json] | ||
{"compilerOptions":{}} | ||
|
||
//// [/a/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; } | ||
|
||
//// [/user/username/projects/myproject/a.js] | ||
v === 'foo'; | ||
|
||
|
||
|
||
Output:: | ||
>> Screen clear | ||
12:00:21 AM - Starting compilation in watch mode... | ||
|
||
|
||
a.ts(10,1): error TS2367: This condition will always return 'false' since the types '{ reallyLongPropertyName1: string | number | bigint | boolean | symbol | object; reallyLongPropertyName2: string | number | bigint | boolean | symbol | object; reallyLongPropertyName3: string | ... 4 more ... | object; reallyLongPropertyName4: string | ... 4 more ... | object; reallyLongPropertyName5: string | ... 4...' and 'string' have no overlap. | ||
|
||
|
||
12:00:24 AM - Found 1 error. Watching for file changes. | ||
|
||
|
||
Program root files: ["/user/username/projects/myproject/a.ts"] | ||
Program options: {"watch":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} | ||
Program files:: | ||
/a/lib/lib.d.ts | ||
/user/username/projects/myproject/a.ts | ||
|
||
Semantic diagnostics in builder refreshed for:: | ||
/a/lib/lib.d.ts | ||
/user/username/projects/myproject/a.ts | ||
|
||
WatchedFiles:: | ||
/user/username/projects/myproject/tsconfig.json: | ||
{"pollingInterval":250} | ||
/user/username/projects/myproject/a.ts: | ||
{"pollingInterval":250} | ||
/a/lib/lib.d.ts: | ||
{"pollingInterval":250} | ||
|
||
FsWatches:: | ||
|
||
FsWatchesRecursive:: | ||
/user/username/projects/myproject/node_modules/@types: | ||
{"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} | ||
/user/username/projects/myproject: | ||
{"fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} | ||
|
||