-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialization Logic, Ambiguous Configurations and Update and Accept …
…Baselines Verified and accepted changes to ensure consistency with the expected output. Fixed a bug where configFileParsingDiagnostics could be undefined, causing runtime errors (Cannot read properties of undefined (reading 'push')). Added guards to ensure diagnostics arrays are always initialized before use. Improved code resilience and prevented potential runtime errors in edge cases.
- Loading branch information
1 parent
8fd6ddf
commit 61a4ddf
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
tests/baselines/reference/nestedConfigurationsWithFilesEmpty.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
message TS6042: No actionable task. Add 'composite': true, valid 'references', or use 'tsc -b'. | ||
|
||
|
||
!!! message TS6042: No actionable task. Add 'composite': true, valid 'references', or use 'tsc -b'. | ||
==== /parent/tsconfig.json (0 errors) ==== | ||
{ | ||
"files": [], | ||
"references": [{ "path": "../child" }] | ||
} | ||
|
||
// @filename: /child/tsconfig.json | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"declarationDir": "out", | ||
"composite": true | ||
}, | ||
"include": ["index.ts"] | ||
} | ||
|
||
// @filename: /child/index.ts | ||
export const childConst = "I am child!"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// @filename: /tsconfig.json | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"declarationDir": "out", | ||
"composite": true | ||
}, | ||
"files": [] | ||
} | ||
|
||
// @filename: /src/index.ts | ||
export const compositeTest = "Composite test case"; | ||
|
19 changes: 19 additions & 0 deletions
19
tests/cases/compiler/nestedConfigurationsWithFilesEmpty.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// @filename: /parent/tsconfig.json | ||
{ | ||
"files": [], | ||
"references": [{ "path": "../child" }] | ||
} | ||
|
||
// @filename: /child/tsconfig.json | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"declarationDir": "out", | ||
"composite": true | ||
}, | ||
"include": ["index.ts"] | ||
} | ||
|
||
// @filename: /child/index.ts | ||
export const childConst = "I am child!"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// @filename: /tsconfig.json | ||
{ | ||
"compilerOptions": { | ||
"noEmit": true, | ||
"composite": true | ||
}, | ||
"files": [] | ||
} | ||
|
||
// @filename: /src/index.ts | ||
export const noEmitTest = "This shouldn't emit"; | ||
|