Parent: #846. Related TypeScript compatibility: #548.
Reproduced on origin/main 2049105 with installed TypeScript 5.7.3 and the rebuilt Home home-tsc, under serial 3,840 MB memory guards. JavaScript owner:
/** @template T */
export class Box {
/** @param {T} value */
constructor(value) {
/** @type {T} */
this.value = value;
}
}TypeScript consumer:
import { Box } from "./owner.js";
const box = new Box("ready");
box.value = 1;
const bad: number = box.value;With strict, noEmit, skipLibCheck, target es2020, module commonjs, allowJs and checkJs, TypeScript reports TS2322 at consumer (3,1) and (4,7), both with the expected string/number messages. Home instead reports TS2339 at (3,5) and (4,25): imported Box has no value member. A local same-file JS Box check and an equivalent TypeScript generic class imported across files both give the expected TS2322 pair in Home. Thus this is specifically loss of source-owned generic JSDoc constructor-member type during JS-to-TS Program transfer.
The current Program JSDoc type-expression subset cannot represent the class template parameter T; its class schema only transfers supported constructor fields. The #846 annotated concrete-field fix deliberately does not turn an unsupported generic member into any or silently accept the invalid writes. Acceptance: preserve the class template parameter in the source-owned schema, transfer the constructor assigned field with that parameter, instantiate it at the consumer, match both positive and negative TypeScript diagnostics, add Program and CLI regressions, and pass the relevant full guarded suites. No any fallback, diagnostic suppression, or fixture changes.