Parent
Evidence
#751 (8c587f6) projects the members an annotated receiver reads. The mirror position — a value written into such an annotation — still leaves nested callback parameters implicitly any. On the #688 module fixtures (util, errors, schemas), with a consumer that only writes:
import type * as schemas from "./schemas.js";
declare function takesSchema(schema: schemas.Schema): void;
const literal: schemas.Schema = {
_zod: {
run: (payload) => { // TS7006 in Home
payload.issues.push({ code: "invalid_type", expected: "string", input: payload.value });
return payload;
},
},
};
takesSchema({
_zod: {
run: (payload) => payload, // TS7006 in Home
},
});| Engine | Result |
|---|---|
| TypeScript 6.0.3 | no diagnostics |
| Native TypeScript 7.0.2 | no diagnostics |
Home 8c587f6fb (ReleaseSafe) | consumer.ts:7:11 TS7006, consumer.ts:16:11 TS7006 |
Home 65f80a525 (before #688) | identical to 8c587f6fb |
Both engines contextually type payload from SchemaInternals.run. Schema is a projection_only Program export, so the annotation's own type stays any in Home and supplies no contextual type to the object literal's nested members. #751 deliberately did not change this: it resolves members that are read, never the annotation's whole type, because publishing the projection as the declared type added 38 Zod identities (recorded in TS_PERFORMANCE.md).
Fair oracle
Reuse the issue_688_* fixtures in packages/ts_program/src/ts_program.zig. Cover an annotated const initializer, a call argument, a nested property, and a returned literal. Each callback body must read a projected member (payload.issues) so silence is not mistaken for any, and each graph needs a deliberate invalid control.
Acceptance
- TypeScript 6.0.3, tsgo 7.0.2, and Home agree by file, line, column, and code.
- Contextual types only: the projection must not become the annotation's type, and writes must not be checked against an approximate whole type (a regression here shows up as new Zod TS2345/TS2322).
- Exact Zod 4.5.2 core diagnostic identity A/B shows zero additions.
- Full Program/checker suites and optimized builds pass, evidence documented and linked from the README.