-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test showing how setting strict is not preserved in tsbuildinfo
Test for #44305
- Loading branch information
1 parent
d2516fa
commit b6754e4
Showing
2 changed files
with
116 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
98 changes: 98 additions & 0 deletions
98
tests/baselines/reference/tsc/incremental/initial-build/when-project-has-strict-true.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,98 @@ | ||
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/class1.ts] | ||
export class class1 {} | ||
|
||
//// [/src/project/tsconfig.json] | ||
{"compilerOptions":{"incremental":true,"strict":true}} | ||
|
||
|
||
|
||
Output:: | ||
/lib/tsc -noEmit -p src/project | ||
exitCode:: ExitStatus.Success | ||
Program root files: ["/src/project/class1.ts"] | ||
Program options: {"incremental":true,"strict":true,"noEmit":true,"project":"/src/project","configFilePath":"/src/project/tsconfig.json"} | ||
Program structureReused: Not | ||
Program files:: | ||
/lib/lib.d.ts | ||
/src/project/class1.ts | ||
|
||
Semantic diagnostics in builder refreshed for:: | ||
/lib/lib.d.ts | ||
/src/project/class1.ts | ||
|
||
|
||
//// [/src/project/tsconfig.tsbuildinfo] | ||
{"program":{"fileNames":["../../lib/lib.d.ts","./class1.ts"],"fileInfos":[{"version":"3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-7660182596-export class class1 {}"],"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2],"affectedFilesPendingEmit":[[2,1]]},"version":"FakeTSVersion"} | ||
|
||
//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] | ||
{ | ||
"program": { | ||
"fileNames": [ | ||
"../../lib/lib.d.ts", | ||
"./class1.ts" | ||
], | ||
"fileInfos": { | ||
"../../lib/lib.d.ts": { | ||
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", | ||
"signature": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", | ||
"affectsGlobalScope": true | ||
}, | ||
"./class1.ts": { | ||
"version": "-7660182596-export class class1 {}", | ||
"signature": "-7660182596-export class class1 {}" | ||
} | ||
}, | ||
"referencedMap": {}, | ||
"exportedModulesMap": {}, | ||
"semanticDiagnosticsPerFile": [ | ||
"../../lib/lib.d.ts", | ||
"./class1.ts" | ||
], | ||
"affectedFilesPendingEmit": [ | ||
[ | ||
"./class1.ts", | ||
"Full" | ||
] | ||
] | ||
}, | ||
"version": "FakeTSVersion", | ||
"size": 731 | ||
} | ||
|
||
|
||
|
||
Change:: no-change-run | ||
Input:: | ||
|
||
|
||
Output:: | ||
/lib/tsc -noEmit -p src/project | ||
exitCode:: ExitStatus.Success | ||
Program root files: ["/src/project/class1.ts"] | ||
Program options: {"incremental":true,"strict":true,"noEmit":true,"project":"/src/project","configFilePath":"/src/project/tsconfig.json"} | ||
Program structureReused: Not | ||
Program files:: | ||
/lib/lib.d.ts | ||
/src/project/class1.ts | ||
|
||
Semantic diagnostics in builder refreshed for:: | ||
/lib/lib.d.ts | ||
/src/project/class1.ts | ||
|
||
|