Gets the description from a schema, if available. Works with both Zod v3 and v4.
Both versions expose a .description getter that returns the description from their respective internal storage (v3: _def, v4: globalRegistry).
.description
Gets the description from a schema, if available. Works with both Zod v3 and v4.
Both versions expose a
.descriptiongetter that returns the description from their respective internal storage (v3: _def, v4: globalRegistry).