Open RyanMyrvold opened 23 hours ago
Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.
Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.
Fixes #60479
This PR improves the TypeScript compiler's behavior when encountering ambiguous configurations in
tsconfig.json
, such as when thefiles
array is empty. The goal is to ensure users get clear, actionable feedback instead of silent failures or confusing results.New Diagnostic Added
A new error message, TS6042, helps developers understand what to do when there’s no actionable task in their configuration.
Example message: "No actionable task. Add 'composite': true, valid 'references', or use 'tsc -b'."
Clearer Guidance for Edge Cases
Handles configurations like
files: []
, ensuring diagnostics are surfaced instead of failing silently.Helps developers understand best practices, such as enabling
composite
or using project references.Additional Tests
Added new tests to cover the following scenarios:
tsconfig.json
has an emptyfiles
array and valid child references.composite: true
but no references.--noEmit
flag, ensuring the flag works alongside the new diagnostics.When a
tsconfig.json
has an emptyfiles
array or lacks actionable tasks, it can be frustrating to debug why nothing happens. These updates aim to: