Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/colinhacks/zod
/ optional
Method
optional
packages/zod/src/v4/classic/schemas.ts:162–162 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
160
161
// wrappers
162
optional(): ZodOptional<this>;
163
exactOptional(): ZodExactOptional<this>;
164
nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional<this>;
165
nullable(): ZodNullable<this>;
Callers
15
index.ts
File · 0.80
nullish
Function · 0.80
partial
Method · 0.80
ostring
Function · 0.80
onumber
Function · 0.80
oboolean
Function · 0.80
function.test.ts
File · 0.80
record.test.ts
File · 0.80
primitive.test.ts
File · 0.80
language-server.source.ts
File · 0.80
error.test.ts
File · 0.80
anyunknown.test.ts
File · 0.80
Calls
no outgoing calls
Tested by
14
checkErrors
Function · 0.64
subcategories
Function · 0.64
a
Function · 0.64
features
Function · 0.64
slots
Function · 0.64
children
Function · 0.64
parent
Function · 0.64
optional
Function · 0.64
optself
Function · 0.64
stripOuter
Function · 0.64
subcategories
Function · 0.64
b
Function · 0.64