Verified differential (TypeScript 5.7.3)
With allowJs, checkJs, strict, noEmit, module: commonjs:
module.exports = function () {};
module.exports.extra = function () {};TypeScript exits 0 with no diagnostics. The currently built Home CLI emitted TS2339 on module.exports.extra (and the separate spurious TS2309 tracked in #964). The analogous class export with a later module.exports.T write also exits 0 in TypeScript, while Home emitted TS2339. This is a distinct expando-shape problem: removing TS2309 alone does not type the later property.
Acceptance
- Model later
module.exports.namewrites as static/expando members of an exported function or class where TypeScript does, and expose them to importers. - Preserve genuine TS2339 for writes to non-extensible/closed values and respect declared property types.
- Add exact owner and importer TypeScript 5.7.3 CLI controls, Program/checker tests, and guarded sequential suite verification.
- Do not suppress TS2339 without representing the member in the exported type.