core/api.ts:1784 and :1785 report a false TS7006 on v in truthyArray.map((v) => ...). The receiver is any, and TypeScript reports TS7006 on an any receiver too, so the diagnostic is correct and the cause is upstream: util.normalizeParams(_params) types as any across files. Three independent defects each keep it any:
- Cross-file transfer of
Recordand utility types.Normalize<T>usesRecord<any, any>and util's ownOmit<T, K> = Pick<T, Exclude<keyof T, K>>.program_schema.zigpendingSupportedrejects.record(unless readonly) and.utility(unless extract/exclude), so the declaration degrades to an opaque leaf and lowers toany. The consumer rejects them as well (lowerProgramExpression:.partial/.required/.readonly/.pick/.omit, and a.recordwith a non-string/number/symbol key). Record<any, V>lowers toany. The builtinRecordlowering handles string/number/symbol/generic/literal/enum keys but notany. tsgo maps ananykey to a string index signature (Any|String -> stringType). As a resultT extends Record<any, any>behaves asT extends any.- A homomorphic mapped type instantiated with
any(zod'sFlatten<T> = Identity<{ [k in keyof T]: T[k] }>) yields{ [x: string]: any[k] }instead of{ [x: string]: any }: the key parameter is never substituted into the index value andany[k]is not reduced. This also drives the three sibling false TS2411s atapi.ts:1760/1761/1767. Regression shape to pin:import * as u from "./u.js"; type I<T>=T; type F<T>=I<{[k in keyof T]:T[k]}>; interface X extends F<any> { a?: string[] }must not report TS2411.
Fixing (1) widens transfer for every cross-file declaration that currently degrades, so it needs the same A/B discipline as #754. An adversarial check found that (1)+(2) alone do not clear the corpus sites; (3) is required.