Problem
home-tsc parses --target and --jsx well enough for the emitter, but the checker does not see the same resolved command-line options. It reports diagnostics that contradict the generated JavaScript and exits 1.
Reproduced on current main (332fa5e81) with a freshly built home-tsc.
--target
class Box { #value = 1; read() { return this.#value; } }$ home-tsc --ignoreConfig input.ts --target es2022 --outDir out
input.ts:1:13 - error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.The emitted file correctly retains the ES2022 private field:
class Box {
#value = 1;
read() {
return this.#value;
}
}--jsx
const element = <span />;$ home-tsc --ignoreConfig input.tsx --jsx react --outDir out
input.tsx:1:17 - error TS17004: Cannot use JSX unless the '--jsx' flag is provided.The emitted file correctly uses the requested React transform:
const element = React.createElement("span", null);Both commands exit 1 despite honoring the options during emit. This makes valid CLI builds fail and shows that checker and emitter option state diverge.
Acceptance
- Resolve CLI and tsconfig options once and pass the same effective target/JSX settings to parsing, checking, and emission.
--target es2015and newer permit private identifiers without TS18028; older targets retain the intended diagnostic behavior.- a supported
--jsxmode permits JSX without TS17004 and produces the selected transform. - CLI overrides retain the documented precedence over tsconfig values.
- Add CLI-level regression coverage that checks diagnostics, exit status, and emitted output together.
No-workaround boundary
Do not suppress TS18028/TS17004 at the CLI or infer validity from emitted text. Fix propagation of the resolved compiler options so all compiler phases use one coherent configuration.