Skip to main content
Exécutez n'importe quel Skill dans Manus
en un clic

zod-dynamic-schema-type-inference

Étoiles1
Forks0
Mis à jour2 mars 2026 à 12:44

Fix TypeScript type inference loss when dynamically constructing Zod object schemas. Use when: (1) `z.infer<typeof schema>` produces `Record<string, unknown>` instead of typed fields, (2) Building a schema factory that constructs `z.object()` from dynamic field maps, (3) Component props typed from Zod schema show 'unknown' for all fields, (4) Type error "'data.fieldName' is of type 'unknown'" after refactoring schemas to use a factory pattern. Covers Zod 3 and Zod 4.

Installation

Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.

SKILL.md
readonly