Core $ZodTypes docs omit $ZodFunction and $ZodPrefault
Author: januththedevCreated Sep 25, 2026Updated Sep 25, 2026
Description
The core documentation presents $ZodTypes as the union of all first-party schema subclasses, but it omits $ZodFunction and $ZodPrefault. The inheritance diagram also omits $ZodFunction.
The authoritative source union in packages/zod/src/v4/core/schemas.ts includes both types, so copying the documented union into an exhaustive visitor or type-level switch misses valid public schemas.
Expected
The documented union and diagram match schemas.ts and include $ZodFunction and $ZodPrefault.
Actual
The “all first-party subclasses” union lists neither type, and the diagram omits $ZodFunction.
I found no existing issue or PR for these missing union members. A small documentation update and type-level regression check should be sufficient.
Source: colinhacks/zod