MCPcopy
hub / github.com/colinhacks/zod / isOptional

Function isOptional

packages/zod/src/v3/types.ts:529–531  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

527 }
528
529 isOptional(): boolean {
530 return this.safeParse(undefined).success;
531 }
532 isNullable(): boolean {
533 return this.safeParse(null).success;
534 }

Callers

nothing calls this directly

Calls 1

safeParseMethod · 0.65

Tested by

no test coverage detected