From a2467221ba1bf97421340135e4a4afc0129f083f Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 23 Jul 2026 19:59:58 -0700 Subject: [PATCH 1/2] Add test for propagation without declaration signatures Cover an incremental noEmit build where a change propagates through a re-export and its importer after source versions were stored as signatures. --- internal/execute/tsctests/tsc_test.go | 32 ++ ...signature-propagation-through-reexports.js | 400 ++++++++++++++++++ 2 files changed, 432 insertions(+) create mode 100644 testdata/baselines/reference/tsc/incremental/incremental-signature-propagation-through-reexports.js diff --git a/internal/execute/tsctests/tsc_test.go b/internal/execute/tsctests/tsc_test.go index 29cba7ba4e2..31fed27f601 100644 --- a/internal/execute/tsctests/tsc_test.go +++ b/internal/execute/tsctests/tsc_test.go @@ -1348,6 +1348,38 @@ func TestTscIncremental(t *testing.T) { } } testCases := []*tscInput{ + { + subScenario: "incremental signature propagation through reexports", + files: FileMap{ + "/home/src/workspaces/project/tsconfig.json": stringtestutil.Dedent(` + { + "compilerOptions": { + "incremental": true, + "noEmit": true, + "module": "esnext", + }, + }`), + "/home/src/workspaces/project/hub.ts": `export const value = 1;`, + "/home/src/workspaces/project/reexport.ts": `export { value } from "./hub";`, + "/home/src/workspaces/project/importer.ts": stringtestutil.Dedent(` + import { value } from "./reexport"; + console.log(value);`), + }, + edits: []*tscEdit{ + { + caption: "append ordinary comment", + edit: func(sys *TestSys) { + sys.appendFile("/home/src/workspaces/project/hub.ts", "\n// comment") + }, + }, + { + caption: "change exported value", + edit: func(sys *TestSys) { + sys.replaceFileText("/home/src/workspaces/project/hub.ts", "value = 1", "value = 'one'") + }, + }, + }, + }, { subScenario: "serializing error chain", files: FileMap{ diff --git a/testdata/baselines/reference/tsc/incremental/incremental-signature-propagation-through-reexports.js b/testdata/baselines/reference/tsc/incremental/incremental-signature-propagation-through-reexports.js new file mode 100644 index 00000000000..f1c5658e48e --- /dev/null +++ b/testdata/baselines/reference/tsc/incremental/incremental-signature-propagation-through-reexports.js @@ -0,0 +1,400 @@ +currentDirectory::/home/src/workspaces/project +useCaseSensitiveFileNames::true +Input:: +//// [/home/src/workspaces/project/hub.ts] *new* +export const value = 1; +//// [/home/src/workspaces/project/importer.ts] *new* +import { value } from "./reexport"; +console.log(value); +//// [/home/src/workspaces/project/reexport.ts] *new* +export { value } from "./hub"; +//// [/home/src/workspaces/project/tsconfig.json] *new* +{ + "compilerOptions": { + "incremental": true, + "noEmit": true, + "module": "esnext", + }, +} + +tsgo +ExitStatus:: Success +Output:: +//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +declare const console: { log(msg: any): void; }; +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2025.full.d.ts","./hub.ts","./reexport.ts","./importer.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"9ae38e3a9bd5acd9f384aed0787571ff-export const value = 1;","d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";","23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);"],"fileIdsList":[[3],[2]],"options":{"module":99},"referencedMap":[[4,1],[3,2]],"affectedFilesPendingEmit":[2,4,3]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./hub.ts", + "./reexport.ts", + "./importer.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.es2025.full.d.ts", + "./hub.ts", + "./reexport.ts", + "./importer.ts" + ], + "fileInfos": [ + { + "fileName": "lib.es2025.full.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./hub.ts", + "version": "9ae38e3a9bd5acd9f384aed0787571ff-export const value = 1;", + "signature": "9ae38e3a9bd5acd9f384aed0787571ff-export const value = 1;", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./reexport.ts", + "version": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", + "signature": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", + "impliedNodeFormat": "CommonJS" + }, + { + "fileName": "./importer.ts", + "version": "23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);", + "signature": "23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "./reexport.ts" + ], + [ + "./hub.ts" + ] + ], + "options": { + "module": 99 + }, + "referencedMap": { + "./importer.ts": [ + "./reexport.ts" + ], + "./reexport.ts": [ + "./hub.ts" + ] + }, + "affectedFilesPendingEmit": [ + [ + "./hub.ts", + "Js", + 2 + ], + [ + "./importer.ts", + "Js", + 4 + ], + [ + "./reexport.ts", + "Js", + 3 + ] + ], + "size": 1240 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts +*refresh* /home/src/workspaces/project/hub.ts +*refresh* /home/src/workspaces/project/reexport.ts +*refresh* /home/src/workspaces/project/importer.ts +Signatures:: + + +Edit [0]:: append ordinary comment +//// [/home/src/workspaces/project/hub.ts] *modified* +export const value = 1; +// comment + +tsgo +ExitStatus:: Success +Output:: +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2025.full.d.ts","./hub.ts","./reexport.ts","./importer.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d30072c6a70ae5d26a3b9f1a0c63af03-export const value = 1;\n// comment","signature":"ba5c8ef2b0978fc944b312728d63c3f1-export declare const value = 1;\n","impliedNodeFormat":1},{"version":"d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";","signature":"6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n","impliedNodeFormat":1},{"version":"23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"module":99},"referencedMap":[[4,1],[3,2]],"affectedFilesPendingEmit":[2,4,3]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./hub.ts", + "./reexport.ts", + "./importer.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.es2025.full.d.ts", + "./hub.ts", + "./reexport.ts", + "./importer.ts" + ], + "fileInfos": [ + { + "fileName": "lib.es2025.full.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./hub.ts", + "version": "d30072c6a70ae5d26a3b9f1a0c63af03-export const value = 1;\n// comment", + "signature": "ba5c8ef2b0978fc944b312728d63c3f1-export declare const value = 1;\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d30072c6a70ae5d26a3b9f1a0c63af03-export const value = 1;\n// comment", + "signature": "ba5c8ef2b0978fc944b312728d63c3f1-export declare const value = 1;\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./reexport.ts", + "version": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", + "signature": "6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", + "signature": "6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./importer.ts", + "version": "23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);", + "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", + "impliedNodeFormat": 1 + } + } + ], + "fileIdsList": [ + [ + "./reexport.ts" + ], + [ + "./hub.ts" + ] + ], + "options": { + "module": 99 + }, + "referencedMap": { + "./importer.ts": [ + "./reexport.ts" + ], + "./reexport.ts": [ + "./hub.ts" + ] + }, + "affectedFilesPendingEmit": [ + [ + "./hub.ts", + "Js", + 2 + ], + [ + "./importer.ts", + "Js", + 4 + ], + [ + "./reexport.ts", + "Js", + 3 + ] + ], + "size": 1577 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/project/hub.ts +*refresh* /home/src/workspaces/project/reexport.ts +*refresh* /home/src/workspaces/project/importer.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/project/hub.ts +(computed .d.ts) /home/src/workspaces/project/reexport.ts +(computed .d.ts) /home/src/workspaces/project/importer.ts + + +Edit [1]:: change exported value +//// [/home/src/workspaces/project/hub.ts] *modified* +export const value = 'one'; +// comment + +tsgo +ExitStatus:: Success +Output:: +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2025.full.d.ts","./hub.ts","./reexport.ts","./importer.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7406586c3ea25aed2dc08660dfb2cc13-export const value = 'one';\n// comment","signature":"e4163a3e4c4379367c549366a939940a-export declare const value = \"one\";\n","impliedNodeFormat":1},{"version":"d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";","signature":"6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n","impliedNodeFormat":1},"23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);"],"fileIdsList":[[3],[2]],"options":{"module":99},"referencedMap":[[4,1],[3,2]],"affectedFilesPendingEmit":[2,4,3]} +//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* +{ + "version": "FakeTSVersion", + "root": [ + { + "files": [ + "./hub.ts", + "./reexport.ts", + "./importer.ts" + ], + "original": [ + 2, + 4 + ] + } + ], + "fileNames": [ + "lib.es2025.full.d.ts", + "./hub.ts", + "./reexport.ts", + "./importer.ts" + ], + "fileInfos": [ + { + "fileName": "lib.es2025.full.d.ts", + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "signature": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": "CommonJS", + "original": { + "version": "8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true, + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./hub.ts", + "version": "7406586c3ea25aed2dc08660dfb2cc13-export const value = 'one';\n// comment", + "signature": "e4163a3e4c4379367c549366a939940a-export declare const value = \"one\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "7406586c3ea25aed2dc08660dfb2cc13-export const value = 'one';\n// comment", + "signature": "e4163a3e4c4379367c549366a939940a-export declare const value = \"one\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./reexport.ts", + "version": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", + "signature": "6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n", + "impliedNodeFormat": "CommonJS", + "original": { + "version": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", + "signature": "6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n", + "impliedNodeFormat": 1 + } + }, + { + "fileName": "./importer.ts", + "version": "23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);", + "signature": "23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);", + "impliedNodeFormat": "CommonJS" + } + ], + "fileIdsList": [ + [ + "./reexport.ts" + ], + [ + "./hub.ts" + ] + ], + "options": { + "module": 99 + }, + "referencedMap": { + "./importer.ts": [ + "./reexport.ts" + ], + "./reexport.ts": [ + "./hub.ts" + ] + }, + "affectedFilesPendingEmit": [ + [ + "./hub.ts", + "Js", + 2 + ], + [ + "./importer.ts", + "Js", + 4 + ], + [ + "./reexport.ts", + "Js", + 3 + ] + ], + "size": 1493 +} + +tsconfig.json:: +SemanticDiagnostics:: +*refresh* /home/src/workspaces/project/hub.ts +*refresh* /home/src/workspaces/project/reexport.ts +*refresh* /home/src/workspaces/project/importer.ts +Signatures:: +(computed .d.ts) /home/src/workspaces/project/hub.ts +(computed .d.ts) /home/src/workspaces/project/reexport.ts +(used version) /home/src/workspaces/project/importer.ts From ced6b98c7c4500ad4b2740e11721ebcf50a7a03b Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 23 Jul 2026 19:59:58 -0700 Subject: [PATCH 2/2] Skip declaration emit without a prior signature When an unchanged importer has signature == version, there is no previous declaration signature available for comparison. Computing one may allow propagation to stop, but requires declaration emit. Skip that refinement and conservatively continue through the importer graph instead. --- .../incremental/affectedfileshandler.go | 14 ++- .../tsbuild/noEmit/changes-incremental.js | 105 +++++++----------- ...changes-with-initial-noEmit-incremental.js | 75 +++++-------- ...e-to-modifier-of-class-expression-field.js | 28 ++--- .../const-enums-aliased-in-different-file.js | 40 ++----- .../tsc/incremental/const-enums-aliased.js | 67 ++++------- .../reference/tsc/incremental/const-enums.js | 67 ++++------- ...signature-propagation-through-reexports.js | 39 ++----- .../tsc/noEmit/changes-incremental.js | 105 +++++++----------- ...changes-with-initial-noEmit-incremental.js | 75 +++++-------- ...s-change-in-symlinked-node_modules-file.js | 1 - .../watch-handles-file-rapidly-recreated.js | 1 - 12 files changed, 220 insertions(+), 397 deletions(-) diff --git a/internal/execute/incremental/affectedfileshandler.go b/internal/execute/incremental/affectedfileshandler.go index 1ae76425f87..436bc3a25c6 100644 --- a/internal/execute/incremental/affectedfileshandler.go +++ b/internal/execute/incremental/affectedfileshandler.go @@ -132,9 +132,17 @@ func (h *affectedFilesHandler) getFilesAffectedBy(path tspath.Path) []*ast.Sourc seenFileNamesMap := h.forEachFileReferencedBy( file, func(currentFile *ast.SourceFile, currentPath tspath.Path) (queueForFile bool, fastReturn bool) { - // If the current file is not nil and has a shape change, we need to queue it for processing - if currentFile != nil && h.updateShapeSignature(currentFile, false) { - return true, false + if currentFile != nil { + info, _ := h.program.snapshot.fileInfos.Load(currentPath) + if !currentFile.IsDeclarationFile && info.signature == info.version { + // This file has no previous declaration signature. Computing one may show + // that propagation can stop, but requires declaration emit; skip that + // refinement and conservatively continue to its importers. + return true, false + } + if h.updateShapeSignature(currentFile, false) { + return true, false + } } return false, false }, diff --git a/testdata/baselines/reference/tsbuild/noEmit/changes-incremental.js b/testdata/baselines/reference/tsbuild/noEmit/changes-incremental.js index 643753a068e..9cdefb8f25d 100644 --- a/testdata/baselines/reference/tsbuild/noEmit/changes-incremental.js +++ b/testdata/baselines/reference/tsbuild/noEmit/changes-incremental.js @@ -333,7 +333,7 @@ Errors Files 1 src/noChangeFileWithEmitSpecificError.ts:1 //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},{"version":"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},{"version":"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,4,3,5]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,4,3,5]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -389,35 +389,20 @@ Errors Files { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/indirectUse.ts", "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/noChangeFile.ts", @@ -556,7 +541,7 @@ Errors Files 5 ] ], - "size": 3058 + "size": 2691 } tsconfig.json:: @@ -567,9 +552,8 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts -(computed .d.ts) /home/src/workspaces/project/src/directUse.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectUse.ts +(used version) /home/src/workspaces/project/src/directUse.ts +(used version) /home/src/workspaces/project/src/indirectUse.ts Edit [3]:: Fix error and emit @@ -601,7 +585,7 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 //// [/home/src/workspaces/project/src/indirectClass.js] *rewrite with same content* //// [/home/src/workspaces/project/src/indirectUse.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -657,13 +641,8 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -732,7 +711,7 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 ] ] ], - "size": 2225 + "size": 2046 } tsconfig.json:: @@ -743,7 +722,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts (used version) /home/src/workspaces/project/src/directUse.ts (used version) /home/src/workspaces/project/src/indirectUse.ts @@ -904,9 +882,11 @@ export class classC { prop1 = 1; } +//// [/home/src/workspaces/project/src/directUse.js] *rewrite with same content* //// [/home/src/workspaces/project/src/indirectClass.js] *rewrite with same content* +//// [/home/src/workspaces/project/src/indirectUse.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -962,13 +942,8 @@ export class classC { { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -1097,7 +1072,7 @@ export class classC { ] ] ], - "size": 2833 + "size": 2654 } tsconfig.json:: @@ -1108,7 +1083,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts (used version) /home/src/workspaces/project/src/directUse.ts (used version) /home/src/workspaces/project/src/indirectUse.ts @@ -1334,7 +1308,7 @@ Output:: Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,3]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,4,3,5]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -1390,13 +1364,8 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -1471,13 +1440,23 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 "Js", 2 ], + [ + "./src/directUse.ts", + "Js", + 4 + ], [ "./src/indirectClass.ts", "Js", 3 + ], + [ + "./src/indirectUse.ts", + "Js", + 5 ] ], - "size": 2258 + "size": 2083 } tsconfig.json:: @@ -1488,7 +1467,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts (used version) /home/src/workspaces/project/src/directUse.ts (used version) /home/src/workspaces/project/src/indirectUse.ts @@ -1518,9 +1496,11 @@ export class classC { prop = 1; } +//// [/home/src/workspaces/project/src/directUse.js] *rewrite with same content* //// [/home/src/workspaces/project/src/indirectClass.js] *rewrite with same content* +//// [/home/src/workspaces/project/src/indirectUse.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -1576,13 +1556,8 @@ export class classC { { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -1651,7 +1626,7 @@ export class classC { ] ] ], - "size": 2225 + "size": 2046 } tsconfig.json:: diff --git a/testdata/baselines/reference/tsbuild/noEmit/changes-with-initial-noEmit-incremental.js b/testdata/baselines/reference/tsbuild/noEmit/changes-with-initial-noEmit-incremental.js index 084caff138e..488216b3255 100644 --- a/testdata/baselines/reference/tsbuild/noEmit/changes-with-initial-noEmit-incremental.js +++ b/testdata/baselines/reference/tsbuild/noEmit/changes-with-initial-noEmit-incremental.js @@ -471,7 +471,7 @@ export class classC { //// [/home/src/workspaces/project/src/indirectClass.js] *rewrite with same content* //// [/home/src/workspaces/project/src/indirectUse.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},{"version":"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},{"version":"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -527,35 +527,20 @@ export class classC { { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/indirectUse.ts", "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/noChangeFile.ts", @@ -672,7 +657,7 @@ export class classC { ] ] ], - "size": 3021 + "size": 2654 } tsconfig.json:: @@ -683,9 +668,8 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts -(computed .d.ts) /home/src/workspaces/project/src/directUse.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectUse.ts +(used version) /home/src/workspaces/project/src/directUse.ts +(used version) /home/src/workspaces/project/src/indirectUse.ts Edit [2]:: Fix error and no emit @@ -713,7 +697,7 @@ Output:: Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,3]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,4,3,5]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -769,13 +753,8 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -850,13 +829,23 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 "Js", 2 ], + [ + "./src/directUse.ts", + "Js", + 4 + ], [ "./src/indirectClass.ts", "Js", 3 + ], + [ + "./src/indirectUse.ts", + "Js", + 5 ] ], - "size": 2258 + "size": 2083 } tsconfig.json:: @@ -867,7 +856,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts (used version) /home/src/workspaces/project/src/directUse.ts (used version) /home/src/workspaces/project/src/indirectUse.ts @@ -897,9 +885,11 @@ export class classC { prop = 1; } +//// [/home/src/workspaces/project/src/directUse.js] *rewrite with same content* //// [/home/src/workspaces/project/src/indirectClass.js] *rewrite with same content* +//// [/home/src/workspaces/project/src/indirectUse.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -955,13 +945,8 @@ export class classC { { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -1030,7 +1015,7 @@ export class classC { ] ] ], - "size": 2225 + "size": 2046 } tsconfig.json:: diff --git a/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js b/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js index ad99d4166c2..efe2e36325a 100644 --- a/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js +++ b/testdata/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js @@ -254,7 +254,7 @@ Found 2 errors in the same file, starting at: MessageablePerson.ts:7 //// [/home/src/workspaces/project/MessageablePerson.js] *rewrite with same content* //// [/home/src/workspaces/project/main.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fc3bcee26e986c769691717bfbe49525-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"9bca542f83dba4822510bd12bc5e9db9-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n\n(116,7): error4094: Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094\nmessage\n\n(116,7): error9027: Add_a_type_annotation_to_the_variable_0_9027\nwrapper\n","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"module":99},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"pos":172,"end":184,"code":2304,"category":1,"messageKey":"Cannot_find_name_0_2304","messageArgs":["InstanceType"]},{"pos":185,"end":195,"code":2304,"category":1,"messageKey":"Cannot_find_name_0_2304","messageArgs":["ReturnType"]}]]]} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"fc3bcee26e986c769691717bfbe49525-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"9bca542f83dba4822510bd12bc5e9db9-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n\n(116,7): error4094: Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094\nmessage\n\n(116,7): error9027: Add_a_type_annotation_to_the_variable_0_9027\nwrapper\n","impliedNodeFormat":1},"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}"],"fileIdsList":[[2]],"options":{"module":99},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"pos":172,"end":184,"code":2304,"category":1,"messageKey":"Cannot_find_name_0_2304","messageArgs":["InstanceType"]},{"pos":185,"end":195,"code":2304,"category":1,"messageKey":"Cannot_find_name_0_2304","messageArgs":["ReturnType"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -302,13 +302,8 @@ Found 2 errors in the same file, starting at: MessageablePerson.ts:7 { "fileName": "./main.ts", "version": "f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}", + "impliedNodeFormat": "CommonJS" } ], "fileIdsList": [ @@ -351,7 +346,7 @@ Found 2 errors in the same file, starting at: MessageablePerson.ts:7 ] ] ], - "size": 2263 + "size": 2169 } tsconfig.json:: @@ -360,7 +355,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/main.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/MessageablePerson.ts -(computed .d.ts) /home/src/workspaces/project/main.ts Edit [2]:: no change @@ -417,7 +411,7 @@ Found 2 errors in the same file, starting at: MessageablePerson.ts:7 //// [/home/src/workspaces/project/MessageablePerson.js] *rewrite with same content* //// [/home/src/workspaces/project/main.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"500cfddf7f97c595e46579b9b5afc9bd-const Messageable = () => {\n return class MessageableClass {\n public message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"3847cb0c7d8f5a6eaa57e0b19ab33ea8-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n","impliedNodeFormat":1},{"version":"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"module":99},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"pos":169,"end":181,"code":2304,"category":1,"messageKey":"Cannot_find_name_0_2304","messageArgs":["InstanceType"]},{"pos":182,"end":192,"code":2304,"category":1,"messageKey":"Cannot_find_name_0_2304","messageArgs":["ReturnType"]}]]]} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","./MessageablePerson.ts","./main.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"500cfddf7f97c595e46579b9b5afc9bd-const Messageable = () => {\n return class MessageableClass {\n public message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"3847cb0c7d8f5a6eaa57e0b19ab33ea8-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n","impliedNodeFormat":1},"f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}"],"fileIdsList":[[2]],"options":{"module":99},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"pos":169,"end":181,"code":2304,"category":1,"messageKey":"Cannot_find_name_0_2304","messageArgs":["InstanceType"]},{"pos":182,"end":192,"code":2304,"category":1,"messageKey":"Cannot_find_name_0_2304","messageArgs":["ReturnType"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -465,13 +459,8 @@ Found 2 errors in the same file, starting at: MessageablePerson.ts:7 { "fileName": "./main.ts", "version": "f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "f1d6119c9df9ff1b48604c0e5c5f624f-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}", + "impliedNodeFormat": "CommonJS" } ], "fileIdsList": [ @@ -514,7 +503,7 @@ Found 2 errors in the same file, starting at: MessageablePerson.ts:7 ] ] ], - "size": 2070 + "size": 1976 } tsconfig.json:: @@ -523,7 +512,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/main.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/MessageablePerson.ts -(computed .d.ts) /home/src/workspaces/project/main.ts Edit [4]:: no change diff --git a/testdata/baselines/reference/tsc/incremental/const-enums-aliased-in-different-file.js b/testdata/baselines/reference/tsc/incremental/const-enums-aliased-in-different-file.js index 3b3d61734be..4eaa1c69cda 100644 --- a/testdata/baselines/reference/tsc/incremental/const-enums-aliased-in-different-file.js +++ b/testdata/baselines/reference/tsc/incremental/const-enums-aliased-in-different-file.js @@ -383,7 +383,7 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[5],"fileNames":["lib.es2025.full.d.ts","./worker.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"c1b69d4c011b97277dab4f0539048ca5-export const enum AWorker {\n ONE = 3\n}","7e628d40719306e63d220f210cef8697-export { AWorker as A } from \"./worker\";export const randomThing = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},{"version":"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.es2025.full.d.ts","./worker.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"c1b69d4c011b97277dab4f0539048ca5-export const enum AWorker {\n ONE = 3\n}","7e628d40719306e63d220f210cef8697-export { AWorker as A } from \"./worker\";export const randomThing = 10;","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -430,24 +430,14 @@ Output:: { "fileName": "./c.ts", "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": 1 - } + "signature": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./a.ts", "version": "f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE", + "impliedNodeFormat": "CommonJS" } ], "fileIdsList": [ @@ -475,7 +465,7 @@ Output:: "./b.d.ts" ] }, - "size": 1582 + "size": 1363 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -485,8 +475,7 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: (used version) /home/src/workspaces/project/b.d.ts -(computed .d.ts) /home/src/workspaces/project/c.ts -(computed .d.ts) /home/src/workspaces/project/a.ts +(used version) /home/src/workspaces/project/a.ts Edit [3]:: something else changes in b.d.ts again @@ -496,8 +485,9 @@ export { AWorker as A } from "./worker";export const randomThing = 10;export con tsgo -i a.ts --tsbuildinfofile a.tsbuildinfo ExitStatus:: Success Output:: +//// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[5],"fileNames":["lib.es2025.full.d.ts","./worker.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"c1b69d4c011b97277dab4f0539048ca5-export const enum AWorker {\n ONE = 3\n}","85de628566e341d0050fe40f7319973e-export { AWorker as A } from \"./worker\";export const randomThing = 10;export const randomThing2 = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} +{"version":"FakeTSVersion","root":[5],"fileNames":["lib.es2025.full.d.ts","./worker.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"c1b69d4c011b97277dab4f0539048ca5-export const enum AWorker {\n ONE = 3\n}","85de628566e341d0050fe40f7319973e-export { AWorker as A } from \"./worker\";export const randomThing = 10;export const randomThing2 = 10;","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[4],[2],[3]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[5,1],[3,2],[4,3]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -544,13 +534,8 @@ Output:: { "fileName": "./c.ts", "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": 1 - } + "signature": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./a.ts", @@ -584,7 +569,7 @@ Output:: "./b.d.ts" ] }, - "size": 1519 + "size": 1394 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -594,5 +579,4 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: (used version) /home/src/workspaces/project/b.d.ts -(computed .d.ts) /home/src/workspaces/project/c.ts (used version) /home/src/workspaces/project/a.ts diff --git a/testdata/baselines/reference/tsc/incremental/const-enums-aliased.js b/testdata/baselines/reference/tsc/incremental/const-enums-aliased.js index 7f9d49d4f31..d556d27b1f7 100644 --- a/testdata/baselines/reference/tsc/incremental/const-enums-aliased.js +++ b/testdata/baselines/reference/tsc/incremental/const-enums-aliased.js @@ -148,7 +148,7 @@ let a = 2 /* A.ONE */; export {}; //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"ec710e331e7d6432e994b69e21aae83c-export const enum AWorker {\n ONE = 2\n}\nexport { AWorker as A };",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},{"version":"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"ec710e331e7d6432e994b69e21aae83c-export const enum AWorker {\n ONE = 2\n}\nexport { AWorker as A };","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -188,24 +188,14 @@ export {}; { "fileName": "./c.ts", "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": 1 - } + "signature": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./a.ts", "version": "f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE", + "impliedNodeFormat": "CommonJS" } ], "fileIdsList": [ @@ -227,7 +217,7 @@ export {}; "./b.d.ts" ] }, - "size": 1474 + "size": 1255 } //// [/home/src/workspaces/project/c.js] *modified* let b = 2 /* A.ONE */; @@ -240,8 +230,7 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: (used version) /home/src/workspaces/project/b.d.ts -(computed .d.ts) /home/src/workspaces/project/c.ts -(computed .d.ts) /home/src/workspaces/project/a.ts +(used version) /home/src/workspaces/project/a.ts Edit [1]:: change enum value again @@ -259,7 +248,7 @@ let a = 3 /* A.ONE */; export {}; //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"a65f34f1792fbedf7b83c3bf4a12fc1d-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"a65f34f1792fbedf7b83c3bf4a12fc1d-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -299,13 +288,8 @@ export {}; { "fileName": "./c.ts", "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": 1 - } + "signature": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./a.ts", @@ -333,7 +317,7 @@ export {}; "./b.d.ts" ] }, - "size": 1380 + "size": 1255 } //// [/home/src/workspaces/project/c.js] *modified* let b = 3 /* A.ONE */; @@ -346,7 +330,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: (used version) /home/src/workspaces/project/b.d.ts -(computed .d.ts) /home/src/workspaces/project/c.ts (used version) /home/src/workspaces/project/a.ts @@ -362,7 +345,7 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"842b68cd3ee2dcec7d1df8517668c731-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };export const randomThing = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"842b68cd3ee2dcec7d1df8517668c731-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };export const randomThing = 10;","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -402,13 +385,8 @@ Output:: { "fileName": "./c.ts", "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": 1 - } + "signature": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./a.ts", @@ -436,7 +414,7 @@ Output:: "./b.d.ts" ] }, - "size": 1410 + "size": 1285 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -446,7 +424,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: (used version) /home/src/workspaces/project/b.d.ts -(computed .d.ts) /home/src/workspaces/project/c.ts (used version) /home/src/workspaces/project/a.ts @@ -462,7 +439,7 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"2e80eb5c14425cedaabae48745225bc6-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };export const randomThing = 10;export const randomThing2 = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"2e80eb5c14425cedaabae48745225bc6-export const enum AWorker {\n ONE = 3\n}\nexport { AWorker as A };export const randomThing = 10;export const randomThing2 = 10;","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -502,13 +479,8 @@ Output:: { "fileName": "./c.ts", "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": 1 - } + "signature": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./a.ts", @@ -536,7 +508,7 @@ Output:: "./b.d.ts" ] }, - "size": 1441 + "size": 1316 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -546,5 +518,4 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: (used version) /home/src/workspaces/project/b.d.ts -(computed .d.ts) /home/src/workspaces/project/c.ts (used version) /home/src/workspaces/project/a.ts diff --git a/testdata/baselines/reference/tsc/incremental/const-enums.js b/testdata/baselines/reference/tsc/incremental/const-enums.js index 95f4a284f05..24d77037c66 100644 --- a/testdata/baselines/reference/tsc/incremental/const-enums.js +++ b/testdata/baselines/reference/tsc/incremental/const-enums.js @@ -146,7 +146,7 @@ let a = 2 /* A.ONE */; export {}; //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"d04ca273da9def3b63557363c6eae3ca-export const enum A {\n ONE = 2\n}",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},{"version":"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"d04ca273da9def3b63557363c6eae3ca-export const enum A {\n ONE = 2\n}","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -186,24 +186,14 @@ export {}; { "fileName": "./c.ts", "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": 1 - } + "signature": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./a.ts", "version": "f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE", + "impliedNodeFormat": "CommonJS" } ], "fileIdsList": [ @@ -225,7 +215,7 @@ export {}; "./b.d.ts" ] }, - "size": 1442 + "size": 1223 } //// [/home/src/workspaces/project/c.js] *modified* let b = 2 /* A.ONE */; @@ -238,8 +228,7 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: (used version) /home/src/workspaces/project/b.d.ts -(computed .d.ts) /home/src/workspaces/project/c.ts -(computed .d.ts) /home/src/workspaces/project/a.ts +(used version) /home/src/workspaces/project/a.ts Edit [1]:: change enum value again @@ -256,7 +245,7 @@ let a = 3 /* A.ONE */; export {}; //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"097e7efa854e788c6281c17b46d9460a-export const enum A {\n ONE = 3\n}",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"097e7efa854e788c6281c17b46d9460a-export const enum A {\n ONE = 3\n}","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -296,13 +285,8 @@ export {}; { "fileName": "./c.ts", "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": 1 - } + "signature": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./a.ts", @@ -330,7 +314,7 @@ export {}; "./b.d.ts" ] }, - "size": 1348 + "size": 1223 } //// [/home/src/workspaces/project/c.js] *modified* let b = 3 /* A.ONE */; @@ -343,7 +327,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: (used version) /home/src/workspaces/project/b.d.ts -(computed .d.ts) /home/src/workspaces/project/c.ts (used version) /home/src/workspaces/project/a.ts @@ -358,7 +341,7 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"40d09f9f7c0089340619c57a80ff0ab1-export const enum A {\n ONE = 3\n}export const randomThing = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"40d09f9f7c0089340619c57a80ff0ab1-export const enum A {\n ONE = 3\n}export const randomThing = 10;","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -398,13 +381,8 @@ Output:: { "fileName": "./c.ts", "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": 1 - } + "signature": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./a.ts", @@ -432,7 +410,7 @@ Output:: "./b.d.ts" ] }, - "size": 1378 + "size": 1253 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -442,7 +420,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: (used version) /home/src/workspaces/project/b.d.ts -(computed .d.ts) /home/src/workspaces/project/c.ts (used version) /home/src/workspaces/project/a.ts @@ -457,7 +434,7 @@ ExitStatus:: Success Output:: //// [/home/src/workspaces/project/a.js] *rewrite with same content* //// [/home/src/workspaces/project/a.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"ee6472d5ac80e48bb4cea44493dd5fe8-export const enum A {\n ONE = 3\n}export const randomThing = 10;export const randomThing2 = 10;",{"version":"27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","signature":"f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n","impliedNodeFormat":1},"f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} +{"version":"FakeTSVersion","root":[4],"fileNames":["lib.es2025.full.d.ts","./b.d.ts","./c.ts","./a.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},"ee6472d5ac80e48bb4cea44493dd5fe8-export const enum A {\n ONE = 3\n}export const randomThing = 10;export const randomThing2 = 10;","27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}","f69fa3d8747995fb7603cfd9c694aa6b-import {A} from \"./c\"\nlet a = A.ONE"],"fileIdsList":[[3],[2]],"options":{"tsBuildInfoFile":"./a.tsbuildinfo"},"referencedMap":[[4,1],[3,2]]} //// [/home/src/workspaces/project/a.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -497,13 +474,8 @@ Output:: { "fileName": "./c.ts", "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", - "signature": "f6d90ac6a94594899853de488fc81940-import { A } from \"./b\";\nexport { A };\n", - "impliedNodeFormat": 1 - } + "signature": "27be335cb83f09e0543d1a6458f51e79-import {A} from \"./b\"\nlet b = A.ONE\nexport {A}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./a.ts", @@ -531,7 +503,7 @@ Output:: "./b.d.ts" ] }, - "size": 1409 + "size": 1284 } //// [/home/src/workspaces/project/c.js] *rewrite with same content* @@ -541,5 +513,4 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/a.ts Signatures:: (used version) /home/src/workspaces/project/b.d.ts -(computed .d.ts) /home/src/workspaces/project/c.ts (used version) /home/src/workspaces/project/a.ts diff --git a/testdata/baselines/reference/tsc/incremental/incremental-signature-propagation-through-reexports.js b/testdata/baselines/reference/tsc/incremental/incremental-signature-propagation-through-reexports.js index f1c5658e48e..608a256f45b 100644 --- a/testdata/baselines/reference/tsc/incremental/incremental-signature-propagation-through-reexports.js +++ b/testdata/baselines/reference/tsc/incremental/incremental-signature-propagation-through-reexports.js @@ -156,7 +156,7 @@ tsgo ExitStatus:: Success Output:: //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2025.full.d.ts","./hub.ts","./reexport.ts","./importer.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d30072c6a70ae5d26a3b9f1a0c63af03-export const value = 1;\n// comment","signature":"ba5c8ef2b0978fc944b312728d63c3f1-export declare const value = 1;\n","impliedNodeFormat":1},{"version":"d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";","signature":"6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n","impliedNodeFormat":1},{"version":"23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"options":{"module":99},"referencedMap":[[4,1],[3,2]],"affectedFilesPendingEmit":[2,4,3]} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2025.full.d.ts","./hub.ts","./reexport.ts","./importer.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d30072c6a70ae5d26a3b9f1a0c63af03-export const value = 1;\n// comment","signature":"ba5c8ef2b0978fc944b312728d63c3f1-export declare const value = 1;\n","impliedNodeFormat":1},"d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";","23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);"],"fileIdsList":[[3],[2]],"options":{"module":99},"referencedMap":[[4,1],[3,2]],"affectedFilesPendingEmit":[2,4,3]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -206,24 +206,14 @@ Output:: { "fileName": "./reexport.ts", "version": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", - "signature": "6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", - "signature": "6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n", - "impliedNodeFormat": 1 - } + "signature": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./importer.ts", "version": "23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);", + "impliedNodeFormat": "CommonJS" } ], "fileIdsList": [ @@ -262,7 +252,7 @@ Output:: 3 ] ], - "size": 1577 + "size": 1367 } tsconfig.json:: @@ -272,8 +262,7 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/importer.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/hub.ts -(computed .d.ts) /home/src/workspaces/project/reexport.ts -(computed .d.ts) /home/src/workspaces/project/importer.ts +(used version) /home/src/workspaces/project/importer.ts Edit [1]:: change exported value @@ -285,7 +274,7 @@ tsgo ExitStatus:: Success Output:: //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2025.full.d.ts","./hub.ts","./reexport.ts","./importer.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7406586c3ea25aed2dc08660dfb2cc13-export const value = 'one';\n// comment","signature":"e4163a3e4c4379367c549366a939940a-export declare const value = \"one\";\n","impliedNodeFormat":1},{"version":"d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";","signature":"6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n","impliedNodeFormat":1},"23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);"],"fileIdsList":[[3],[2]],"options":{"module":99},"referencedMap":[[4,1],[3,2]],"affectedFilesPendingEmit":[2,4,3]} +{"version":"FakeTSVersion","root":[[2,4]],"fileNames":["lib.es2025.full.d.ts","./hub.ts","./reexport.ts","./importer.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7406586c3ea25aed2dc08660dfb2cc13-export const value = 'one';\n// comment","signature":"e4163a3e4c4379367c549366a939940a-export declare const value = \"one\";\n","impliedNodeFormat":1},"d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";","23fbccfab572480bb3fa6f41a1ea8483-import { value } from \"./reexport\";\nconsole.log(value);"],"fileIdsList":[[3],[2]],"options":{"module":99},"referencedMap":[[4,1],[3,2]],"affectedFilesPendingEmit":[2,4,3]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -335,13 +324,8 @@ Output:: { "fileName": "./reexport.ts", "version": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", - "signature": "6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", - "signature": "6ce530d9117ca908ebd8607ea2f3310e-export { value } from \"./hub\";\n", - "impliedNodeFormat": 1 - } + "signature": "d5041c1ab88dbbd3cd99d36379352deb-export { value } from \"./hub\";", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./importer.ts", @@ -386,7 +370,7 @@ Output:: 3 ] ], - "size": 1493 + "size": 1377 } tsconfig.json:: @@ -396,5 +380,4 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/importer.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/hub.ts -(computed .d.ts) /home/src/workspaces/project/reexport.ts (used version) /home/src/workspaces/project/importer.ts diff --git a/testdata/baselines/reference/tsc/noEmit/changes-incremental.js b/testdata/baselines/reference/tsc/noEmit/changes-incremental.js index 2719f96c2f2..0be29caef60 100644 --- a/testdata/baselines/reference/tsc/noEmit/changes-incremental.js +++ b/testdata/baselines/reference/tsc/noEmit/changes-incremental.js @@ -305,7 +305,7 @@ Errors Files 1 src/noChangeFileWithEmitSpecificError.ts:1 //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},{"version":"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},{"version":"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,4,3,5]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,4,3,5]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -361,35 +361,20 @@ Errors Files { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/indirectUse.ts", "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/noChangeFile.ts", @@ -528,7 +513,7 @@ Errors Files 5 ] ], - "size": 3058 + "size": 2691 } tsconfig.json:: @@ -539,9 +524,8 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts -(computed .d.ts) /home/src/workspaces/project/src/directUse.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectUse.ts +(used version) /home/src/workspaces/project/src/directUse.ts +(used version) /home/src/workspaces/project/src/indirectUse.ts Edit [3]:: Fix error and emit @@ -566,7 +550,7 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 //// [/home/src/workspaces/project/src/indirectClass.js] *rewrite with same content* //// [/home/src/workspaces/project/src/indirectUse.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -622,13 +606,8 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -697,7 +676,7 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 ] ] ], - "size": 2225 + "size": 2046 } tsconfig.json:: @@ -708,7 +687,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts (used version) /home/src/workspaces/project/src/directUse.ts (used version) /home/src/workspaces/project/src/indirectUse.ts @@ -834,9 +812,11 @@ export class classC { prop1 = 1; } +//// [/home/src/workspaces/project/src/directUse.js] *rewrite with same content* //// [/home/src/workspaces/project/src/indirectClass.js] *rewrite with same content* +//// [/home/src/workspaces/project/src/indirectUse.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -892,13 +872,8 @@ export class classC { { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -1027,7 +1002,7 @@ export class classC { ] ] ], - "size": 2833 + "size": 2654 } tsconfig.json:: @@ -1038,7 +1013,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts (used version) /home/src/workspaces/project/src/directUse.ts (used version) /home/src/workspaces/project/src/indirectUse.ts @@ -1229,7 +1203,7 @@ Output:: Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,3]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,4,3,5]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -1285,13 +1259,8 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -1366,13 +1335,23 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 "Js", 2 ], + [ + "./src/directUse.ts", + "Js", + 4 + ], [ "./src/indirectClass.ts", "Js", 3 + ], + [ + "./src/indirectUse.ts", + "Js", + 5 ] ], - "size": 2258 + "size": 2083 } tsconfig.json:: @@ -1383,7 +1362,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts (used version) /home/src/workspaces/project/src/directUse.ts (used version) /home/src/workspaces/project/src/indirectUse.ts @@ -1406,9 +1384,11 @@ export class classC { prop = 1; } +//// [/home/src/workspaces/project/src/directUse.js] *rewrite with same content* //// [/home/src/workspaces/project/src/indirectClass.js] *rewrite with same content* +//// [/home/src/workspaces/project/src/indirectUse.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -1464,13 +1444,8 @@ export class classC { { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -1539,7 +1514,7 @@ export class classC { ] ] ], - "size": 2225 + "size": 2046 } tsconfig.json:: diff --git a/testdata/baselines/reference/tsc/noEmit/changes-with-initial-noEmit-incremental.js b/testdata/baselines/reference/tsc/noEmit/changes-with-initial-noEmit-incremental.js index 737ade219a6..1d0773e76d3 100644 --- a/testdata/baselines/reference/tsc/noEmit/changes-with-initial-noEmit-incremental.js +++ b/testdata/baselines/reference/tsc/noEmit/changes-with-initial-noEmit-incremental.js @@ -450,7 +450,7 @@ export class classC { //// [/home/src/workspaces/project/src/indirectClass.js] *rewrite with same content* //// [/home/src/workspaces/project/src/indirectUse.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},{"version":"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},{"version":"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"abe7d9981d6018efb6b2b794f40a1607-export {};\n","impliedNodeFormat":1},"12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5da9f4ab128bbaf87adf83ca7ae8e2d-export class classC {\n prop1 = 1;\n}","signature":"e36cbd492db9c71062d723d518b6277f-export declare class classC {\n prop1: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[4,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[5,[{"pos":76,"end":80,"code":2551,"category":1,"messageKey":"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","messageArgs":["prop","classC","prop1"],"relatedInformation":[{"file":2,"pos":26,"end":31,"code":2728,"category":3,"messageKey":"_0_is_declared_here_2728","messageArgs":["prop1"]}]}]],[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -506,35 +506,20 @@ export class classC { { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/indirectUse.ts", "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", - "signature": "abe7d9981d6018efb6b2b794f40a1607-export {};\n", - "impliedNodeFormat": 1 - } + "signature": "1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/noChangeFile.ts", @@ -651,7 +636,7 @@ export class classC { ] ] ], - "size": 3021 + "size": 2654 } tsconfig.json:: @@ -662,9 +647,8 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts -(computed .d.ts) /home/src/workspaces/project/src/directUse.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectUse.ts +(used version) /home/src/workspaces/project/src/directUse.ts +(used version) /home/src/workspaces/project/src/indirectUse.ts Edit [2]:: Fix error and no emit @@ -685,7 +669,7 @@ Output:: Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,3]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]],"affectedFilesPendingEmit":[2,4,3,5]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -741,13 +725,8 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -822,13 +801,23 @@ Found 1 error in src/noChangeFileWithEmitSpecificError.ts:1 "Js", 2 ], + [ + "./src/directUse.ts", + "Js", + 4 + ], [ "./src/indirectClass.ts", "Js", 3 + ], + [ + "./src/indirectUse.ts", + "Js", + 5 ] ], - "size": 2258 + "size": 2083 } tsconfig.json:: @@ -839,7 +828,6 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/src/indirectUse.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/src/class.ts -(computed .d.ts) /home/src/workspaces/project/src/indirectClass.ts (used version) /home/src/workspaces/project/src/directUse.ts (used version) /home/src/workspaces/project/src/indirectUse.ts @@ -862,9 +850,11 @@ export class classC { prop = 1; } +//// [/home/src/workspaces/project/src/directUse.js] *rewrite with same content* //// [/home/src/workspaces/project/src/indirectClass.js] *rewrite with same content* +//// [/home/src/workspaces/project/src/indirectUse.js] *rewrite with same content* //// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified* -{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},{"version":"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n","impliedNodeFormat":1},"1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} +{"version":"FakeTSVersion","root":[[2,7]],"fileNames":["lib.es2025.full.d.ts","./src/class.ts","./src/indirectClass.ts","./src/directUse.ts","./src/indirectUse.ts","./src/noChangeFile.ts","./src/noChangeFileWithEmitSpecificError.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"5106d5119e9d454b0e9d7956b0f66ab8-export class classC {\n prop = 1;\n}","signature":"8743eb01f3ddad300611aa9bbf6b6c0a-export declare class classC {\n prop: number;\n}\n","impliedNodeFormat":1},"2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","1e7a664a983b65ba5fbd926c9dad4a26-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","12f2d04905c254bde932222194cd2d1b-export function writeLog(s: string) {\n}",{"version":"f54e687ca7ac9fc3c2161967d09e9950-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true,"impliedNodeFormat":1}],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[[7,[{"pos":18,"end":27,"code":1100,"category":1,"messageKey":"Invalid_use_of_0_in_strict_mode_1100","messageArgs":["arguments"]}]]]} //// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified* { "version": "FakeTSVersion", @@ -920,13 +910,8 @@ export class classC { { "fileName": "./src/indirectClass.ts", "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": "CommonJS", - "original": { - "version": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", - "signature": "4c7e50f9604f4038b2f1bafae04987bb-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n", - "impliedNodeFormat": 1 - } + "signature": "2d32895543847620d7c9848ddd3a7306-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "impliedNodeFormat": "CommonJS" }, { "fileName": "./src/directUse.ts", @@ -995,7 +980,7 @@ export class classC { ] ] ], - "size": 2225 + "size": 2046 } tsconfig.json:: diff --git a/testdata/baselines/reference/tscWatch/commandLineWatch/watch-detects-change-in-symlinked-node_modules-file.js b/testdata/baselines/reference/tscWatch/commandLineWatch/watch-detects-change-in-symlinked-node_modules-file.js index de6faa404f9..b7e1f581669 100644 --- a/testdata/baselines/reference/tscWatch/commandLineWatch/watch-detects-change-in-symlinked-node_modules-file.js +++ b/testdata/baselines/reference/tscWatch/commandLineWatch/watch-detects-change-in-symlinked-node_modules-file.js @@ -79,4 +79,3 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/index.ts Signatures:: (used version) /home/src/workspaces/shared/index.ts -(computed .d.ts) /home/src/workspaces/project/index.ts diff --git a/testdata/baselines/reference/tscWatch/commandLineWatch/watch-handles-file-rapidly-recreated.js b/testdata/baselines/reference/tscWatch/commandLineWatch/watch-handles-file-rapidly-recreated.js index 3b8816bcea4..9f8bfa18773 100644 --- a/testdata/baselines/reference/tscWatch/commandLineWatch/watch-handles-file-rapidly-recreated.js +++ b/testdata/baselines/reference/tscWatch/commandLineWatch/watch-handles-file-rapidly-recreated.js @@ -82,4 +82,3 @@ SemanticDiagnostics:: *refresh* /home/src/workspaces/project/index.ts Signatures:: (computed .d.ts) /home/src/workspaces/project/data.ts -(computed .d.ts) /home/src/workspaces/project/index.ts