typescript-go
typescript-go copied to clipboard
Different diagnostics and exit code vs tsc for tsconfig using extends + baseUrl + wildcard paths
Repro repo
https://github.com/safal207/typescript-go-qa-findings/tree/main/repros/tsconfig-paths-extends
Scenario
A minimal tsconfig scenario using:
extendsbaseUrl- wildcard
paths
produces different diagnostics and a different exit code between classic tsc and typescript-go.
Repro command
npm run compare:tsconfig-extends
classic tsc
tsconfig.json(4,5): error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
Visit https://aka.ms/ts6 for migration information.
Exit code: 2
typescript-go
tsconfig.json(4,5): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
Use '"paths": {"*": ["./*"]}' instead.
tsconfig.json(6,18): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
Exit code: 1
Difference
| Area | classic tsc | typescript-go |
|---|---|---|
| Exit code | 2 | 1 |
| Main diagnostic | TS5101 | TS5102 |
| Extra diagnostic | none | TS5090 |
Why this may matter
This affects a common real-world configuration pattern (extends + baseUrl + paths) and may create migration friction because equivalent project configuration produces different diagnostics and different CLI exit codes.
may create migration friction
Indeed, the option was entirely deprecated. Behavioral difference is expected in this case since the option is no longer supported.