diff --git a/tsc/internal/compiler/program.go b/tsc/internal/compiler/program.go
index 2c7aa08030d8a..2faa0df61b21d 100644
--- a/tsc/internal/compiler/program.go
+++ b/tsc/internal/compiler/program.go
@@ -826,10 +826,16 @@ func (p *Program) GetSemanticDiagnostics(ctx context.Context, sourceFile *ast.So
// GetSemanticDiagnosticsForIncremental includes newly discovered globals in each
// file's cached diagnostics and leaves noEmit filtering to the builder.
func (p *Program) GetSemanticDiagnosticsForIncremental(ctx context.Context, sourceFiles []*ast.SourceFile) map[*ast.SourceFile][]*ast.Diagnostic {
- allDiags := p.collectCheckerDiagnosticsFromFiles(ctx, sourceFiles, func(ctx context.Context, c *checker.Checker, file *ast.SourceFile) []*ast.Diagnostic {
+ collect := func(ctx context.Context, c *checker.Checker, file *ast.SourceFile) []*ast.Diagnostic {
return p.getBindAndCheckDiagnosticsWithChecker(ctx, c, file, true /*includeDeferredGlobals*/)
- })
+ }
result := make(map[*ast.SourceFile][]*ast.Diagnostic, len(sourceFiles))
+ if len(sourceFiles) == 1 {
+ file := sourceFiles[0]
+ result[file] = p.collectCheckerDiagnostics(ctx, file, collect)
+ return result
+ }
+ allDiags := p.collectCheckerDiagnosticsFromFiles(ctx, sourceFiles, collect)
for i, diags := range allDiags {
result[sourceFiles[i]] = filterAndSortDiagnostics(diags)
}
diff --git a/tsc/internal/execute/incremental/affectedfileshandler.go b/tsc/internal/execute/incremental/affectedfileshandler.go
index 50ca58e8f676b..c9ba25f548443 100644
--- a/tsc/internal/execute/incremental/affectedfileshandler.go
+++ b/tsc/internal/execute/incremental/affectedfileshandler.go
@@ -22,14 +22,16 @@ func (c dtsMayChange) addFileToAffectedFilesPendingEmit(filePath tspath.PathKey,
}
type updatedSignature struct {
- mu sync.Mutex
- signature string
- kind SignatureUpdateKind
+ mu sync.Mutex
+ signature string
+ kind SignatureUpdateKind
+ semanticDiagnostics *DiagnosticsOrBuildInfoDiagnosticsWithFileName
}
type affectedFilesHandler struct {
ctx context.Context
program *Program
+ collectSemanticDiagnostics bool
hasAllFilesExcludingDefaultLibraryFile atomic.Bool
updatedSignatures collections.SyncMap[tspath.PathKey, *updatedSignature]
dtsMayChange []dtsMayChange
@@ -101,6 +103,13 @@ func (h *affectedFilesHandler) updateShapeSignature(file *ast.SourceFile, useFil
// JSON files have no declaration output from which to compute a shape
// signature, so use the file version to conservatively invalidate dependents.
if !file.IsDeclarationFile && !ast.IsJsonSourceFile(file) && !useFileVersionAsSignature {
+ if h.collectSemanticDiagnostics && !h.program.snapshot.options.NoCheck.IsTrue() {
+ // Signature generation can discover globals before checking does. Keep the
+ // checking diagnostics first, without retaining incidental emit-only errors.
+ update.semanticDiagnostics = &DiagnosticsOrBuildInfoDiagnosticsWithFileName{
+ diagnostics: h.program.program.GetSemanticDiagnosticsForIncremental(h.ctx, core.SingleElementSlice(file))[file],
+ }
+ }
update.signature = h.computeDtsSignature(file)
}
// Default is to use file version as signature
@@ -347,6 +356,12 @@ func (h *affectedFilesHandler) updateSnapshot() {
h.program.snapshot.semanticDiagnosticsPerFile.Delete(file)
return true
})
+ h.updatedSignatures.Range(func(filePath tspath.PathKey, update *updatedSignature) bool {
+ if update.semanticDiagnostics != nil && h.filesToRemoveDiagnostics.Has(filePath) {
+ h.program.snapshot.semanticDiagnosticsPerFile.Store(filePath, update.semanticDiagnostics)
+ }
+ return true
+ })
for _, change := range h.dtsMayChange {
for filePath, emitKind := range change {
h.program.snapshot.addFileToAffectedFilesPendingEmit(filePath, emitKind)
@@ -356,12 +371,12 @@ func (h *affectedFilesHandler) updateSnapshot() {
h.program.snapshot.buildInfoEmitPending.Store(true)
}
-func collectAllAffectedFiles(ctx context.Context, program *Program) {
+func collectAllAffectedFiles(ctx context.Context, program *Program, collectSemanticDiagnostics bool) {
if program.snapshot.changedFilesSet.Size() == 0 {
return
}
- handler := affectedFilesHandler{ctx: ctx, program: program}
+ handler := affectedFilesHandler{ctx: ctx, program: program, collectSemanticDiagnostics: collectSemanticDiagnostics}
wg := core.NewWorkGroup(handler.program.program.SingleThreaded())
var result collections.SyncSet[*ast.SourceFile]
program.snapshot.changedFilesSet.Range(func(file tspath.PathKey) bool {
diff --git a/tsc/internal/execute/incremental/emitfileshandler.go b/tsc/internal/execute/incremental/emitfileshandler.go
index 36711a652bbe3..eb14ebba44a75 100644
--- a/tsc/internal/execute/incremental/emitfileshandler.go
+++ b/tsc/internal/execute/incremental/emitfileshandler.go
@@ -116,7 +116,7 @@ func (h *emitFilesHandler) emitBuildInfo(options compiler.EmitOptions, result *c
func (h *emitFilesHandler) emitFilesIncremental(options compiler.EmitOptions) []*compiler.EmitResult {
// Get all affected files
- collectAllAffectedFiles(h.ctx, h.program)
+ collectAllAffectedFiles(h.ctx, h.program, false /*collectSemanticDiagnostics*/)
if h.ctx.Err() != nil {
return nil
}
diff --git a/tsc/internal/execute/incremental/program.go b/tsc/internal/execute/incremental/program.go
index 1cb83801fd70a..7f4f23d4344dd 100644
--- a/tsc/internal/execute/incremental/program.go
+++ b/tsc/internal/execute/incremental/program.go
@@ -275,13 +275,15 @@ func (p *Program) Emit(ctx context.Context, options compiler.EmitOptions) *compi
func (p *Program) collectSemanticDiagnosticsOfAffectedFiles(ctx context.Context, file *ast.SourceFile) {
if p.snapshot.canUseIncrementalState() {
// Get all affected files
- collectAllAffectedFiles(ctx, p)
+ collectAllAffectedFiles(ctx, p, true /*collectSemanticDiagnostics*/)
if ctx.Err() != nil {
return
}
-
if p.snapshot.semanticDiagnosticsPerFile.Size() == len(p.program.GetSourceFiles()) {
- // If we have all the files,
+ if p.snapshot.checkPending && !p.snapshot.options.NoCheck.IsTrue() {
+ p.snapshot.checkPending = false
+ p.snapshot.buildInfoEmitPending.Store(true)
+ }
return
}
}
diff --git a/tsc/internal/execute/tsctests/tsc_test.go b/tsc/internal/execute/tsctests/tsc_test.go
index aff5f93620582..4bf297a054135 100644
--- a/tsc/internal/execute/tsctests/tsc_test.go
+++ b/tsc/internal/execute/tsctests/tsc_test.go
@@ -2326,12 +2326,10 @@ func TestTscIncremental(t *testing.T) {
edit: func(sys *TestSys) {
sys.appendFile("/home/src/workspaces/project/repro.ts", "\n// comment-only edit\n")
},
- expectedDiff: "Like Strada, signature generation produces the missing-global diagnostic before semantic checking, so it is excluded from the file's semantic diagnostics.",
},
{
- caption: "no change",
- edit: noChange.edit,
- expectedDiff: "Like Strada, the cached semantic diagnostics do not include the missing-global diagnostic produced during signature generation.",
+ caption: "no change",
+ edit: noChange.edit,
},
{
caption: "delete build info to restore the semantic diagnostic",
@@ -2380,6 +2378,31 @@ func TestTscIncremental(t *testing.T) {
noChange,
},
},
+ {
+ subScenario: "global diagnostics survive build signature generation",
+ files: FileMap{
+ "/home/src/workspaces/project/tsconfig.json": `{"compilerOptions": {"noEmit": true, "incremental": true}}`,
+ "/home/src/workspaces/project/repro.ts": `export function* values() { yield 1; }`,
+ },
+ commandLineArgs: []string{"--build"},
+ edits: []*tscEdit{
+ noChange,
+ {
+ caption: "add a comment",
+ edit: func(sys *TestSys) {
+ sys.appendFile("/home/src/workspaces/project/repro.ts", "\n// comment-only edit\n")
+ },
+ },
+ {
+ caption: "no change",
+ edit: noChange.edit,
+ },
+ newTscEdit("remove the generator", func(sys *TestSys) {
+ sys.writeFileNoError("/home/src/workspaces/project/repro.ts", `export const value = 1;`)
+ }),
+ noChange,
+ },
+ },
{
subScenario: "reverse mapped declaration consumption",
files: FileMap{
@@ -2521,6 +2544,44 @@ func TestTscIncremental(t *testing.T) {
},
}
+ for _, checkers := range []int{1, 2} {
+ for _, build := range []bool{false, true} {
+ args := []string{}
+ if build {
+ args = []string{"--build"}
+ }
+ test := &tscInput{
+ subScenario: fmt.Sprintf("global diagnostics with declaration emit checkers %d build %t", checkers, build),
+ files: FileMap{
+ "/home/src/workspaces/project/tsconfig.json": fmt.Sprintf(`{"compilerOptions": {"declaration": true, "incremental": true, "checkers": %d}}`, checkers),
+ "/home/src/workspaces/project/generator.ts": `export function* values() { yield 1; }`,
+ "/home/src/workspaces/project/index.ts": `import { values } from "./generator"; export const get = values;`,
+ },
+ commandLineArgs: args,
+ edits: []*tscEdit{
+ newTscEdit("edit both modules without changing their types", func(sys *TestSys) {
+ sys.appendFile("/home/src/workspaces/project/generator.ts", "\n// generator comment\n")
+ sys.appendFile("/home/src/workspaces/project/index.ts", "\n// consumer comment\n")
+ }),
+ noChange,
+ newTscEdit("remove the generator", func(sys *TestSys) {
+ sys.writeFileNoError("/home/src/workspaces/project/generator.ts", `export function values() { return 1; }`)
+ }),
+ noChange,
+ newTscEdit("restore the generator", func(sys *TestSys) {
+ sys.writeFileNoError("/home/src/workspaces/project/generator.ts", `export function* values() { yield 2; }`)
+ }),
+ noChange,
+ },
+ }
+ watchTest := *test
+ watchTest.subScenario += " watch"
+ watchTest.commandLineArgs = append(args, "--watch")
+ watchTest.edits = core.Filter(test.edits, func(edit *tscEdit) bool { return edit != noChange })
+ testCases = append(testCases, test, &watchTest)
+ }
+ }
+
for _, test := range testCases {
test.run(t, "incremental")
}
diff --git a/tsc/testdata/baselines/reference/tsbuild/incremental/global-diagnostics-survive-build-signature-generation.js b/tsc/testdata/baselines/reference/tsbuild/incremental/global-diagnostics-survive-build-signature-generation.js
new file mode 100644
index 0000000000000..8c36349337ac0
--- /dev/null
+++ b/tsc/testdata/baselines/reference/tsbuild/incremental/global-diagnostics-survive-build-signature-generation.js
@@ -0,0 +1,429 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/repro.ts] *new*
+export function* values() { yield 1; }
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{"compilerOptions": {"noEmit": true, "incremental": true}}
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/tslibs/TS/Lib/lib.es2026.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","errors":true,"root":[2],"fileNames":["lib.es2026.full.d.ts","./repro.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},"51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }"],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]],"affectedFilesPendingEmit":[2]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./repro.ts"
+ ],
+ "original": 2
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./repro.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./repro.ts",
+ "version": "51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }",
+ "signature": "51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }",
+ "impliedNodeFormat": "CommonJS"
+ }
+ ],
+ "semanticDiagnosticsPerFile": [
+ [
+ "./repro.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "affectedFilesPendingEmit": [
+ [
+ "./repro.ts",
+ "Js",
+ 2
+ ]
+ ],
+ "size": 1150
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/tslibs/TS/Lib/lib.es2026.full.d.ts
+*refresh* /home/src/workspaces/project/repro.ts
+Signatures::
+
+
+Edit [0]:: no change
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./repro.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},"51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }"],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]],"affectedFilesPendingEmit":[2]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "root": [
+ {
+ "files": [
+ "./repro.ts"
+ ],
+ "original": 2
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./repro.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./repro.ts",
+ "version": "51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }",
+ "signature": "51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }",
+ "impliedNodeFormat": "CommonJS"
+ }
+ ],
+ "semanticDiagnosticsPerFile": [
+ [
+ "./repro.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "affectedFilesPendingEmit": [
+ [
+ "./repro.ts",
+ "Js",
+ 2
+ ]
+ ],
+ "size": 1136
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+Signatures::
+
+
+Edit [1]:: add a comment
+//// [/home/src/workspaces/project/repro.ts] *modified*
+export function* values() { yield 1; }
+// comment-only edit
+
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","errors":true,"root":[2],"fileNames":["lib.es2026.full.d.ts","./repro.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":"303d5119b8941b887ef975780b83caec-export function* values() { yield 1; }\n// comment-only edit\n","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1}],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]],"affectedFilesPendingEmit":[2]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./repro.ts"
+ ],
+ "original": 2
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./repro.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./repro.ts",
+ "version": "303d5119b8941b887ef975780b83caec-export function* values() { yield 1; }\n// comment-only edit\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "303d5119b8941b887ef975780b83caec-export function* values() { yield 1; }\n// comment-only edit\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "semanticDiagnosticsPerFile": [
+ [
+ "./repro.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "affectedFilesPendingEmit": [
+ [
+ "./repro.ts",
+ "Js",
+ 2
+ ]
+ ],
+ "size": 1295
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/workspaces/project/repro.ts
+Signatures::
+(computed .d.ts) /home/src/workspaces/project/repro.ts
+
+
+Edit [2]:: no change
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./repro.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":"303d5119b8941b887ef975780b83caec-export function* values() { yield 1; }\n// comment-only edit\n","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1}],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]],"affectedFilesPendingEmit":[2]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "root": [
+ {
+ "files": [
+ "./repro.ts"
+ ],
+ "original": 2
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./repro.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./repro.ts",
+ "version": "303d5119b8941b887ef975780b83caec-export function* values() { yield 1; }\n// comment-only edit\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "303d5119b8941b887ef975780b83caec-export function* values() { yield 1; }\n// comment-only edit\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "semanticDiagnosticsPerFile": [
+ [
+ "./repro.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "affectedFilesPendingEmit": [
+ [
+ "./repro.ts",
+ "Js",
+ 2
+ ]
+ ],
+ "size": 1281
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+Signatures::
+
+
+Edit [3]:: remove the generator
+//// [/home/src/workspaces/project/repro.ts] *modified*
+export const value = 1;
+
+tsgo --build
+ExitStatus:: Success
+Output::
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","root":[2],"fileNames":["lib.es2026.full.d.ts","./repro.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":"9ae38e3a9bd5acd9f384aed0787571ff-export const value = 1;","signature":"ba5c8ef2b0978fc944b312728d63c3f1-export declare const value = 1;\n","impliedNodeFormat":1}],"affectedFilesPendingEmit":[2]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "root": [
+ {
+ "files": [
+ "./repro.ts"
+ ],
+ "original": 2
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./repro.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./repro.ts",
+ "version": "9ae38e3a9bd5acd9f384aed0787571ff-export const value = 1;",
+ "signature": "ba5c8ef2b0978fc944b312728d63c3f1-export declare const value = 1;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "9ae38e3a9bd5acd9f384aed0787571ff-export const value = 1;",
+ "signature": "ba5c8ef2b0978fc944b312728d63c3f1-export declare const value = 1;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "affectedFilesPendingEmit": [
+ [
+ "./repro.ts",
+ "Js",
+ 2
+ ]
+ ],
+ "size": 1077
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/workspaces/project/repro.ts
+Signatures::
+(computed .d.ts) /home/src/workspaces/project/repro.ts
+
+
+Edit [4]:: no change
+
+tsgo --build
+ExitStatus:: Success
+Output::
+
diff --git a/tsc/testdata/baselines/reference/tsbuild/incremental/global-diagnostics-with-declaration-emit-checkers-1-build-true.js b/tsc/testdata/baselines/reference/tsbuild/incremental/global-diagnostics-with-declaration-emit-checkers-1-build-true.js
new file mode 100644
index 0000000000000..d8a5a098f426c
--- /dev/null
+++ b/tsc/testdata/baselines/reference/tsbuild/incremental/global-diagnostics-with-declaration-emit-checkers-1-build-true.js
@@ -0,0 +1,714 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/generator.ts] *new*
+export function* values() { yield 1; }
+//// [/home/src/workspaces/project/index.ts] *new*
+import { values } from "./generator"; export const get = values;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{"compilerOptions": {"declaration": true, "incremental": true, "checkers": 1}}
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/tslibs/TS/Lib/lib.es2026.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/generator.d.ts] *new*
+export declare function values(): {};
+
+//// [/home/src/workspaces/project/generator.js] *new*
+export function* values() { yield 1; }
+
+//// [/home/src/workspaces/project/index.d.ts] *new*
+import { values } from "./generator";
+export declare const get: typeof values;
+
+//// [/home/src/workspaces/project/index.js] *new*
+import { values } from "./generator";
+export const get = values;
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
+{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"408eddb7fe06b3d0f0b51cc3f764f9c6-import { values } from \"./generator\"; export const get = values;","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "408eddb7fe06b3d0f0b51cc3f764f9c6-import { values } from \"./generator\"; export const get = values;",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "408eddb7fe06b3d0f0b51cc3f764f9c6-import { values } from \"./generator\"; export const get = values;",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1603
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/tslibs/TS/Lib/lib.es2026.full.d.ts
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(stored at emit) /home/src/workspaces/project/generator.ts
+(stored at emit) /home/src/workspaces/project/index.ts
+
+
+Edit [0]:: edit both modules without changing their types
+//// [/home/src/workspaces/project/generator.ts] *modified*
+export function* values() { yield 1; }
+// generator comment
+
+//// [/home/src/workspaces/project/index.ts] *modified*
+import { values } from "./generator"; export const get = values;
+// consumer comment
+
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/generator.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/generator.js] *modified*
+export function* values() { yield 1; }
+// generator comment
+
+//// [/home/src/workspaces/project/index.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/index.js] *modified*
+import { values } from "./generator";
+export const get = values;
+// consumer comment
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1650
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(computed .d.ts) /home/src/workspaces/project/generator.ts
+(computed .d.ts) /home/src/workspaces/project/index.ts
+
+
+Edit [1]:: no change
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1636
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+Signatures::
+
+
+Edit [2]:: remove the generator
+//// [/home/src/workspaces/project/generator.ts] *modified*
+export function values() { return 1; }
+
+tsgo --build
+ExitStatus:: Success
+Output::
+//// [/home/src/workspaces/project/generator.d.ts] *modified*
+export declare function values(): number;
+
+//// [/home/src/workspaces/project/generator.js] *modified*
+export function values() { return 1; }
+
+//// [/home/src/workspaces/project/index.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/index.js] *rewrite with same content*
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"76b50f103fa58d67d807c2c7bb428b36-export function values() { return 1; }","signature":"5b54bfb007e5ca333c7948c422d77602-export declare function values(): number;\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "76b50f103fa58d67d807c2c7bb428b36-export function values() { return 1; }",
+ "signature": "5b54bfb007e5ca333c7948c422d77602-export declare function values(): number;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "76b50f103fa58d67d807c2c7bb428b36-export function values() { return 1; }",
+ "signature": "5b54bfb007e5ca333c7948c422d77602-export declare function values(): number;\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "size": 1457
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(computed .d.ts) /home/src/workspaces/project/generator.ts
+(computed .d.ts) /home/src/workspaces/project/index.ts
+
+
+Edit [3]:: no change
+
+tsgo --build
+ExitStatus:: Success
+Output::
+
+
+
+Edit [4]:: restore the generator
+//// [/home/src/workspaces/project/generator.ts] *modified*
+export function* values() { yield 2; }
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/generator.d.ts] *modified*
+export declare function values(): {};
+
+//// [/home/src/workspaces/project/generator.js] *modified*
+export function* values() { yield 2; }
+
+//// [/home/src/workspaces/project/index.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/index.js] *rewrite with same content*
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1626
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(computed .d.ts) /home/src/workspaces/project/generator.ts
+(computed .d.ts) /home/src/workspaces/project/index.ts
+
+
+Edit [5]:: no change
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1612
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+Signatures::
diff --git a/tsc/testdata/baselines/reference/tsbuild/incremental/global-diagnostics-with-declaration-emit-checkers-2-build-true.js b/tsc/testdata/baselines/reference/tsbuild/incremental/global-diagnostics-with-declaration-emit-checkers-2-build-true.js
new file mode 100644
index 0000000000000..f8c24470d2572
--- /dev/null
+++ b/tsc/testdata/baselines/reference/tsbuild/incremental/global-diagnostics-with-declaration-emit-checkers-2-build-true.js
@@ -0,0 +1,714 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/generator.ts] *new*
+export function* values() { yield 1; }
+//// [/home/src/workspaces/project/index.ts] *new*
+import { values } from "./generator"; export const get = values;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{"compilerOptions": {"declaration": true, "incremental": true, "checkers": 2}}
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/tslibs/TS/Lib/lib.es2026.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/generator.d.ts] *new*
+export declare function values(): {};
+
+//// [/home/src/workspaces/project/generator.js] *new*
+export function* values() { yield 1; }
+
+//// [/home/src/workspaces/project/index.d.ts] *new*
+import { values } from "./generator";
+export declare const get: typeof values;
+
+//// [/home/src/workspaces/project/index.js] *new*
+import { values } from "./generator";
+export const get = values;
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
+{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"408eddb7fe06b3d0f0b51cc3f764f9c6-import { values } from \"./generator\"; export const get = values;","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "408eddb7fe06b3d0f0b51cc3f764f9c6-import { values } from \"./generator\"; export const get = values;",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "408eddb7fe06b3d0f0b51cc3f764f9c6-import { values } from \"./generator\"; export const get = values;",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1603
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/tslibs/TS/Lib/lib.es2026.full.d.ts
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(stored at emit) /home/src/workspaces/project/generator.ts
+(stored at emit) /home/src/workspaces/project/index.ts
+
+
+Edit [0]:: edit both modules without changing their types
+//// [/home/src/workspaces/project/generator.ts] *modified*
+export function* values() { yield 1; }
+// generator comment
+
+//// [/home/src/workspaces/project/index.ts] *modified*
+import { values } from "./generator"; export const get = values;
+// consumer comment
+
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/generator.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/generator.js] *modified*
+export function* values() { yield 1; }
+// generator comment
+
+//// [/home/src/workspaces/project/index.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/index.js] *modified*
+import { values } from "./generator";
+export const get = values;
+// consumer comment
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1650
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(computed .d.ts) /home/src/workspaces/project/generator.ts
+(computed .d.ts) /home/src/workspaces/project/index.ts
+
+
+Edit [1]:: no change
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1636
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+Signatures::
+
+
+Edit [2]:: remove the generator
+//// [/home/src/workspaces/project/generator.ts] *modified*
+export function values() { return 1; }
+
+tsgo --build
+ExitStatus:: Success
+Output::
+//// [/home/src/workspaces/project/generator.d.ts] *modified*
+export declare function values(): number;
+
+//// [/home/src/workspaces/project/generator.js] *modified*
+export function values() { return 1; }
+
+//// [/home/src/workspaces/project/index.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/index.js] *rewrite with same content*
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"76b50f103fa58d67d807c2c7bb428b36-export function values() { return 1; }","signature":"5b54bfb007e5ca333c7948c422d77602-export declare function values(): number;\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "76b50f103fa58d67d807c2c7bb428b36-export function values() { return 1; }",
+ "signature": "5b54bfb007e5ca333c7948c422d77602-export declare function values(): number;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "76b50f103fa58d67d807c2c7bb428b36-export function values() { return 1; }",
+ "signature": "5b54bfb007e5ca333c7948c422d77602-export declare function values(): number;\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "size": 1457
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(computed .d.ts) /home/src/workspaces/project/generator.ts
+(computed .d.ts) /home/src/workspaces/project/index.ts
+
+
+Edit [3]:: no change
+
+tsgo --build
+ExitStatus:: Success
+Output::
+
+
+
+Edit [4]:: restore the generator
+//// [/home/src/workspaces/project/generator.ts] *modified*
+export function* values() { yield 2; }
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/generator.d.ts] *modified*
+export declare function values(): {};
+
+//// [/home/src/workspaces/project/generator.js] *modified*
+export function* values() { yield 2; }
+
+//// [/home/src/workspaces/project/index.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/index.js] *rewrite with same content*
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1626
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(computed .d.ts) /home/src/workspaces/project/generator.ts
+(computed .d.ts) /home/src/workspaces/project/index.ts
+
+
+Edit [5]:: no change
+
+tsgo --build
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+
+Found 1 error.
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1612
+}
+
+tsconfig.json::
+SemanticDiagnostics::
+Signatures::
diff --git a/tsc/testdata/baselines/reference/tsbuildWatch/incremental/global-diagnostics-with-declaration-emit-checkers-1-build-true-watch.js b/tsc/testdata/baselines/reference/tsbuildWatch/incremental/global-diagnostics-with-declaration-emit-checkers-1-build-true-watch.js
new file mode 100644
index 0000000000000..6947ac98857a8
--- /dev/null
+++ b/tsc/testdata/baselines/reference/tsbuildWatch/incremental/global-diagnostics-with-declaration-emit-checkers-1-build-true-watch.js
@@ -0,0 +1,518 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/generator.ts] *new*
+export function* values() { yield 1; }
+//// [/home/src/workspaces/project/index.ts] *new*
+import { values } from "./generator"; export const get = values;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{"compilerOptions": {"declaration": true, "incremental": true, "checkers": 1}}
+
+tsgo --build --watch
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
+Output::
+[2J[3J[H[[90mHH:MM:SS AM[0m] Starting compilation in watch mode...
+
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
+
+//// [/home/src/tslibs/TS/Lib/lib.es2026.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/generator.d.ts] *new*
+export declare function values(): {};
+
+//// [/home/src/workspaces/project/generator.js] *new*
+export function* values() { yield 1; }
+
+//// [/home/src/workspaces/project/index.d.ts] *new*
+import { values } from "./generator";
+export declare const get: typeof values;
+
+//// [/home/src/workspaces/project/index.js] *new*
+import { values } from "./generator";
+export const get = values;
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *new*
+{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"408eddb7fe06b3d0f0b51cc3f764f9c6-import { values } from \"./generator\"; export const get = values;","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "51bda3a41e0748f62a85aacc5f248cea-export function* values() { yield 1; }",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "408eddb7fe06b3d0f0b51cc3f764f9c6-import { values } from \"./generator\"; export const get = values;",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "408eddb7fe06b3d0f0b51cc3f764f9c6-import { values } from \"./generator\"; export const get = values;",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1603
+}
+
+Watch Registrations::
+Directory watches::
+ /home/src/tslibs/TS/Lib
+ /home/src/workspaces/project (recursive)
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/tslibs/TS/Lib/lib.es2026.full.d.ts
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(stored at emit) /home/src/workspaces/project/generator.ts
+(stored at emit) /home/src/workspaces/project/index.ts
+
+
+Edit [0]:: edit both modules without changing their types
+//// [/home/src/workspaces/project/generator.ts] *modified*
+export function* values() { yield 1; }
+// generator comment
+
+//// [/home/src/workspaces/project/index.ts] *modified*
+import { values } from "./generator"; export const get = values;
+// consumer comment
+
+
+
+Output::
+[2J[3J[H[[90mHH:MM:SS AM[0m] File change detected. Starting incremental compilation...
+
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
+
+//// [/home/src/workspaces/project/generator.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/generator.js] *modified*
+export function* values() { yield 1; }
+// generator comment
+
+//// [/home/src/workspaces/project/index.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/index.js] *modified*
+import { values } from "./generator";
+export const get = values;
+// consumer comment
+
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "58e23b3277591ca3c8f38099ef173b64-export function* values() { yield 1; }\n// generator comment\n",
+ "signature": "b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "semanticDiagnosticsPerFile": [
+ [
+ "./generator.ts",
+ [
+ {
+ "noFile": true,
+ "code": 2318,
+ "category": 1,
+ "messageKey": "Cannot_find_global_type_0_2318",
+ "messageArgs": [
+ "IterableIterator"
+ ]
+ }
+ ]
+ ]
+ ],
+ "size": 1650
+}
+
+Watch Registrations::
+Directory watches::
+ /home/src/tslibs/TS/Lib
+ /home/src/workspaces/project (recursive)
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(computed .d.ts) /home/src/workspaces/project/generator.ts
+(computed .d.ts) /home/src/workspaces/project/index.ts
+
+
+Edit [1]:: remove the generator
+//// [/home/src/workspaces/project/generator.ts] *modified*
+export function values() { return 1; }
+
+
+Output::
+[2J[3J[H[[90mHH:MM:SS AM[0m] File change detected. Starting incremental compilation...
+
+[[90mHH:MM:SS AM[0m] Found 0 errors. Watching for file changes.
+
+//// [/home/src/workspaces/project/generator.d.ts] *modified*
+export declare function values(): number;
+
+//// [/home/src/workspaces/project/generator.js] *modified*
+export function values() { return 1; }
+
+//// [/home/src/workspaces/project/index.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/index.js] *rewrite with same content*
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"76b50f103fa58d67d807c2c7bb428b36-export function values() { return 1; }","signature":"5b54bfb007e5ca333c7948c422d77602-export declare function values(): number;\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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": "./generator.ts",
+ "version": "76b50f103fa58d67d807c2c7bb428b36-export function values() { return 1; }",
+ "signature": "5b54bfb007e5ca333c7948c422d77602-export declare function values(): number;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "76b50f103fa58d67d807c2c7bb428b36-export function values() { return 1; }",
+ "signature": "5b54bfb007e5ca333c7948c422d77602-export declare function values(): number;\n",
+ "impliedNodeFormat": 1
+ }
+ },
+ {
+ "fileName": "./index.ts",
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": "CommonJS",
+ "original": {
+ "version": "d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n",
+ "signature": "da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n",
+ "impliedNodeFormat": 1
+ }
+ }
+ ],
+ "fileIdsList": [
+ [
+ "./generator.ts"
+ ]
+ ],
+ "options": {
+ "declaration": true
+ },
+ "referencedMap": {
+ "./index.ts": [
+ "./generator.ts"
+ ]
+ },
+ "size": 1457
+}
+
+Watch Registrations::
+Directory watches::
+ /home/src/tslibs/TS/Lib
+ /home/src/workspaces/project (recursive)
+tsconfig.json::
+SemanticDiagnostics::
+*refresh* /home/src/workspaces/project/generator.ts
+*refresh* /home/src/workspaces/project/index.ts
+Signatures::
+(computed .d.ts) /home/src/workspaces/project/generator.ts
+(computed .d.ts) /home/src/workspaces/project/index.ts
+
+
+Edit [2]:: restore the generator
+//// [/home/src/workspaces/project/generator.ts] *modified*
+export function* values() { yield 2; }
+
+
+Output::
+[2J[3J[H[[90mHH:MM:SS AM[0m] File change detected. Starting incremental compilation...
+
+[91merror[0m[90m TS2318: [0mCannot find global type 'IterableIterator'.
+[[90mHH:MM:SS AM[0m] Found 1 error. Watching for file changes.
+
+//// [/home/src/workspaces/project/generator.d.ts] *modified*
+export declare function values(): {};
+
+//// [/home/src/workspaces/project/generator.js] *modified*
+export function* values() { yield 2; }
+
+//// [/home/src/workspaces/project/index.d.ts] *rewrite with same content*
+//// [/home/src/workspaces/project/index.js] *rewrite with same content*
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo] *modified*
+{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2026.full.d.ts","./generator.ts","./index.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":"1c667088c742cf10b57aed5bfc5adcb1-export function* values() { yield 2; }","signature":"b9f7a0d32d9887fdd864bf1c0dcd3591-export declare function values(): {};\n","impliedNodeFormat":1},{"version":"d48419cdb5e1e89bf06ed8dfe5c86e52-import { values } from \"./generator\"; export const get = values;\n// consumer comment\n","signature":"da99cb370e431238f572327aec584c8c-import { values } from \"./generator\";\nexport declare const get: typeof values;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[2,[{"noFile":true,"code":2318,"category":1,"messageKey":"Cannot_find_global_type_0_2318","messageArgs":["IterableIterator"]}]]]}
+//// [/home/src/workspaces/project/tsconfig.tsbuildinfo.readable.baseline.txt] *modified*
+{
+ "version": "FakeTSVersion",
+ "errors": true,
+ "root": [
+ {
+ "files": [
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "original": [
+ 2,
+ 3
+ ]
+ }
+ ],
+ "fileNames": [
+ "lib.es2026.full.d.ts",
+ "./generator.ts",
+ "./index.ts"
+ ],
+ "fileInfos": [
+ {
+ "fileName": "lib.es2026.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-///