Modules
Standard Library
Third Party Modules
NPM
Docs
Manual
API
Deploy
Community
Discord
GitHub
Twitter
YouTube
Mastodon
Search...
⌘ K
!--frsh-globalsearch:0-->
Module
x
/
zod
/
types.ts
>
promise
TypeScript-first schema validation with static type inference
colinhacks/zod
Extremely Popular
Version
v3.23.8
v3.23.7
v3.23.6
v3.23.5
v3.23.4
v3.23.3
v3.23.2
v3.23.1
v3.23.0
v3.23.0-beta.0
v3.22.4
v3.22.2
v3.22.1
v3.22.0
v3.21.4
v3.21.3
v3.21.2
v3.21.1
v3.21.0
v3.20.5
v3.20.4
v3.20.3
v3.20.2
v3.20.1
v3.20
v3.20.0
v3.19.1
v3.19.0
v3.18.0
v3.17.10
v3.17.9
v3.17.7
v3.17.6
v3.17.5
v3.17.4
v3.17.3
v3.17.2
v3.17.0
v3.16.1
v3.16.0
v3.15.1
v3.15.0
v3.14.5
v3.14.4
v3.14.3
v3.14.2
v3.14.1
v3.14.0
v3.13.4
v3.13.2
v3.12.0
v3.11.6
v3.11.4
v3.11.3
v3.10.3
v3.9.8
v3.9.0
v3.8.0
v3.7.3
v3.7.0
v3.6.1
v3.5.1
v3.5.0
v3.4.2
v3.4.0
v3.2
v3.1.0
v3.0.0
3.0.0-beta3
3.0.0-alpha.39
v3.0.0-alpha.33
v3.0.0-alpha.32
v3.0.0-alpha.19
3.0.0-alpha.8
3.0.0-alpha.7
v3-snapshot-2021-01-21
Go to Latest
!--frsh-versionselect:1-->
Menu
benchmarks
helpers
locales
mod.ts
(default module)
N
objectUtil
N
util
N
z
c
ParseStatus
c
Schema
c
ZodAny
c
ZodArray
c
ZodBigInt
c
ZodBoolean
c
ZodBranded
c
ZodCatch
c
ZodDate
c
ZodDefault
c
ZodDiscriminatedUnion
c
ZodEffects
c
ZodEnum
c
ZodError
c
ZodFunction
c
ZodIntersection
c
ZodLazy
c
ZodLiteral
c
ZodMap
c
ZodNaN
c
ZodNativeEnum
c
ZodNever
c
ZodNull
c
ZodNullable
c
ZodNumber
c
ZodObject
c
ZodOptional
c
ZodPipeline
c
ZodPromise
c
ZodRecord
c
ZodSchema
c
ZodSet
c
ZodString
c
ZodSymbol
c
ZodTransformer
c
ZodTuple
c
ZodType
c
ZodUndefined
c
ZodUnion
c
ZodUnknown
c
ZodVoid
I
ParseContext
I
ParseResult
I
ZodAnyDef
I
ZodArrayDef
I
ZodBigIntDef
I
ZodBooleanDef
I
ZodBrandedDef
I
ZodCatchDef
I
ZodCustomIssue
I
ZodDateDef
I
ZodDefaultDef
I
ZodDiscriminatedUnionDef
I
ZodEffectsDef
I
ZodEnumDef
I
ZodFunctionDef
I
ZodIntersectionDef
I
ZodInvalidArgumentsIssue
I
ZodInvalidDateIssue
I
ZodInvalidEnumValueIssue
I
ZodInvalidIntersectionTypesIssue
I
ZodInvalidLiteralIssue
I
ZodInvalidReturnTypeIssue
I
ZodInvalidStringIssue
I
ZodInvalidTypeIssue
I
ZodInvalidUnionDiscriminatorIssue
I
ZodInvalidUnionIssue
I
ZodLazyDef
I
ZodLiteralDef
I
ZodMapDef
I
ZodNaNDef
I
ZodNativeEnumDef
I
ZodNeverDef
I
ZodNotFiniteIssue
I
ZodNotMultipleOfIssue
I
ZodNullableDef
I
ZodNullDef
I
ZodNumberDef
I
ZodObjectDef
I
ZodOptionalDef
I
ZodPipelineDef
I
ZodPromiseDef
I
ZodRecordDef
I
ZodSetDef
I
ZodStringDef
I
ZodSymbolDef
I
ZodTooBigIssue
I
ZodTooSmallIssue
I
ZodTupleDef
I
ZodTypeDef
I
ZodUndefinedDef
I
ZodUnionDef
I
ZodUnknownDef
I
ZodUnrecognizedKeysIssue
I
ZodVoidDef
T
AnyZodObject
T
AnyZodTuple
T
ArrayCardinality
T
ArrayKeys
T
arrayOutputType
T
AssertArray
T
AsyncParseReturnType
T
baseObjectInputType
T
baseObjectOutputType
T
v
BRAND
T
CustomErrorParams
T
DenormalizedError
T
deoptional
T
v
DIRTY
T
Effect
T
EnumLike
T
EnumValues
T
ErrorMapCtx
T
extendShape
T
Indices
T
infer
T
inferFlattenedErrors
T
inferFormattedError
T
InnerTypeOfFunction
T
input
T
InputTypeOfTuple
T
InputTypeOfTupleWithRest
T
v
INVALID
T
IssueData
T
KeySchema
T
objectInputType
T
objectOutputType
T
ObjectPair
T
v
OK
T
OuterTypeOfFunction
T
output
T
OutputTypeOfTuple
T
OutputTypeOfTupleWithRest
T
ParseInput
T
ParseParams
T
ParsePath
T
ParsePathComponent
T
ParseReturnType
T
PreprocessEffect
T
Primitive
T
ProcessedCreateParams
T
RawCreateParams
T
RecordType
T
Refinement
T
RefinementCtx
T
RefinementEffect
T
SafeParseError
T
SafeParseReturnType
T
SafeParseSuccess
T
Scalars
T
SomeZodObject
T
StringValidation
T
SuperRefinement
T
SyncParseReturnType
T
TransformEffect
T
TypeOf
T
typeToFlattenedError
T
UnknownKeysParam
T
Values
T
Writeable
T
ZodDateCheck
T
ZodDiscriminatedUnionOption
T
ZodErrorMap
T
ZodFirstPartySchemaTypes
T
ZodFormattedError
T
ZodIssue
T
ZodIssueBase
T
v
ZodIssueCode
T
ZodIssueOptionalMessage
T
ZodNonEmptyArray
T
ZodNullableType
T
ZodNumberCheck
T
ZodOptionalType
T
v
ZodParsedType
T
ZodRawShape
T
ZodStringCheck
T
ZodTupleItems
T
ZodTypeAny
T
ZodUnionOptions
v
any
v
array
v
bigint
v
boolean
v
coerce
v
custom
v
date
v
defaultErrorMap
v
discriminatedUnion
v
effect
v
EMPTY_PATH
v
enum
v
function
v
getParsedType
v
instanceof
v
intersection
v
isAborted
v
isAsync
v
isDirty
v
isValid
v
late
v
lazy
v
literal
v
makeIssue
v
map
v
nan
v
nativeEnum
v
never
v
NEVER
v
null
v
nullable
v
number
v
object
v
oboolean
v
onumber
v
optional
v
ostring
v
pipeline
v
preprocess
v
promise
v
quotelessJson
v
record
v
set
v
strictObject
v
string
v
symbol
v
transformer
v
tuple
v
undefined
v
union
v
unknown
v
void
f
addIssueToContext
f
getErrorMap
f
setErrorMap
E
ZodFirstPartyTypeKind
errors.ts
v
defaultErrorMap
f
getErrorMap
f
setErrorMap
external.ts
N
objectUtil
N
util
c
ParseStatus
c
Schema
c
ZodAny
c
ZodArray
c
ZodBigInt
c
ZodBoolean
c
ZodBranded
c
ZodCatch
c
ZodDate
c
ZodDefault
c
ZodDiscriminatedUnion
c
ZodEffects
c
ZodEnum
c
ZodError
c
ZodFunction
c
ZodIntersection
c
ZodLazy
c
ZodLiteral
c
ZodMap
c
ZodNaN
c
ZodNativeEnum
c
ZodNever
c
ZodNull
c
ZodNullable
c
ZodNumber
c
ZodObject
c
ZodOptional
c
ZodPipeline
c
ZodPromise
c
ZodRecord
c
ZodSchema
c
ZodSet
c
ZodString
c
ZodSymbol
c
ZodTransformer
c
ZodTuple
c
ZodType
c
ZodUndefined
c
ZodUnion
c
ZodUnknown
c
ZodVoid
I
ParseContext
I
ParseResult
I
ZodAnyDef
I
ZodArrayDef
I
ZodBigIntDef
I
ZodBooleanDef
I
ZodBrandedDef
I
ZodCatchDef
I
ZodCustomIssue
I
ZodDateDef
I
ZodDefaultDef
I
ZodDiscriminatedUnionDef
I
ZodEffectsDef
I
ZodEnumDef
I
ZodFunctionDef
I
ZodIntersectionDef
I
ZodInvalidArgumentsIssue
I
ZodInvalidDateIssue
I
ZodInvalidEnumValueIssue
I
ZodInvalidIntersectionTypesIssue
I
ZodInvalidLiteralIssue
I
ZodInvalidReturnTypeIssue
I
ZodInvalidStringIssue
I
ZodInvalidTypeIssue
I
ZodInvalidUnionDiscriminatorIssue
I
ZodInvalidUnionIssue
I
ZodLazyDef
I
ZodLiteralDef
I
ZodMapDef
I
ZodNaNDef
I
ZodNativeEnumDef
I
ZodNeverDef
I
ZodNotFiniteIssue
I
ZodNotMultipleOfIssue
I
ZodNullableDef
I
ZodNullDef
I
ZodNumberDef
I
ZodObjectDef
I
ZodOptionalDef
I
ZodPipelineDef
I
ZodPromiseDef
I
ZodRecordDef
I
ZodSetDef
I
ZodStringDef
I
ZodSymbolDef
I
ZodTooBigIssue
I
ZodTooSmallIssue
I
ZodTupleDef
I
ZodTypeDef
I
ZodUndefinedDef
I
ZodUnionDef
I
ZodUnknownDef
I
ZodUnrecognizedKeysIssue
I
ZodVoidDef
T
AnyZodObject
T
AnyZodTuple
T
ArrayCardinality
T
ArrayKeys
T
arrayOutputType
T
AssertArray
T
AsyncParseReturnType
T
baseObjectInputType
T
baseObjectOutputType
T
v
BRAND
T
CustomErrorParams
T
DenormalizedError
T
deoptional
T
v
DIRTY
T
Effect
T
EnumLike
T
EnumValues
T
ErrorMapCtx
T
extendShape
T
Indices
T
infer
T
inferFlattenedErrors
T
inferFormattedError
T
InnerTypeOfFunction
T
input
T
InputTypeOfTuple
T
InputTypeOfTupleWithRest
T
v
INVALID
T
IssueData
T
KeySchema
T
objectInputType
T
objectOutputType
T
ObjectPair
T
v
OK
T
OuterTypeOfFunction
T
output
T
OutputTypeOfTuple
T
OutputTypeOfTupleWithRest
T
ParseInput
T
ParseParams
T
ParsePath
T
ParsePathComponent
T
ParseReturnType
T
PreprocessEffect
T
Primitive
T
ProcessedCreateParams
T
RawCreateParams
T
RecordType
T
Refinement
T
RefinementCtx
T
RefinementEffect
T
SafeParseError
T
SafeParseReturnType
T
SafeParseSuccess
T
Scalars
T
SomeZodObject
T
StringValidation
T
SuperRefinement
T
SyncParseReturnType
T
TransformEffect
T
TypeOf
T
typeToFlattenedError
T
UnknownKeysParam
T
Values
T
Writeable
T
ZodDateCheck
T
ZodDiscriminatedUnionOption
T
ZodErrorMap
T
ZodFirstPartySchemaTypes
T
ZodFormattedError
T
ZodIssue
T
ZodIssueBase
T
v
ZodIssueCode
T
ZodIssueOptionalMessage
T
ZodNonEmptyArray
T
ZodNullableType
T
ZodNumberCheck
T
ZodOptionalType
T
v
ZodParsedType
T
ZodRawShape
T
ZodStringCheck
T
ZodTupleItems
T
ZodTypeAny
T
ZodUnionOptions
v
any
v
array
v
bigint
v
boolean
v
coerce
v
custom
v
date
v
defaultErrorMap
v
discriminatedUnion
v
effect
v
EMPTY_PATH
v
enum
v
function
v
getParsedType
v
instanceof
v
intersection
v
isAborted
v
isAsync
v
isDirty
v
isValid
v
late
v
lazy
v
literal
v
makeIssue
v
map
v
nan
v
nativeEnum
v
never
v
NEVER
v
null
v
nullable
v
number
v
object
v
oboolean
v
onumber
v
optional
v
ostring
v
pipeline
v
preprocess
v
promise
v
quotelessJson
v
record
v
set
v
strictObject
v
string
v
symbol
v
transformer
v
tuple
v
undefined
v
union
v
unknown
v
void
f
addIssueToContext
f
getErrorMap
f
setErrorMap
E
ZodFirstPartyTypeKind
index.ts
N
objectUtil
N
util
N
z
c
ParseStatus
c
Schema
c
ZodAny
c
ZodArray
c
ZodBigInt
c
ZodBoolean
c
ZodBranded
c
ZodCatch
c
ZodDate
c
ZodDefault
c
ZodDiscriminatedUnion
c
ZodEffects
c
ZodEnum
c
ZodError
c
ZodFunction
c
ZodIntersection
c
ZodLazy
c
ZodLiteral
c
ZodMap
c
ZodNaN
c
ZodNativeEnum
c
ZodNever
c
ZodNull
c
ZodNullable
c
ZodNumber
c
ZodObject
c
ZodOptional
c
ZodPipeline
c
ZodPromise
c
ZodRecord
c
ZodSchema
c
ZodSet
c
ZodString
c
ZodSymbol
c
ZodTransformer
c
ZodTuple
c
ZodType
c
ZodUndefined
c
ZodUnion
c
ZodUnknown
c
ZodVoid
I
ParseContext
I
ParseResult
I
ZodAnyDef
I
ZodArrayDef
I
ZodBigIntDef
I
ZodBooleanDef
I
ZodBrandedDef
I
ZodCatchDef
I
ZodCustomIssue
I
ZodDateDef
I
ZodDefaultDef
I
ZodDiscriminatedUnionDef
I
ZodEffectsDef
I
ZodEnumDef
I
ZodFunctionDef
I
ZodIntersectionDef
I
ZodInvalidArgumentsIssue
I
ZodInvalidDateIssue
I
ZodInvalidEnumValueIssue
I
ZodInvalidIntersectionTypesIssue
I
ZodInvalidLiteralIssue
I
ZodInvalidReturnTypeIssue
I
ZodInvalidStringIssue
I
ZodInvalidTypeIssue
I
ZodInvalidUnionDiscriminatorIssue
I
ZodInvalidUnionIssue
I
ZodLazyDef
I
ZodLiteralDef
I
ZodMapDef
I
ZodNaNDef
I
ZodNativeEnumDef
I
ZodNeverDef
I
ZodNotFiniteIssue
I
ZodNotMultipleOfIssue
I
ZodNullableDef
I
ZodNullDef
I
ZodNumberDef
I
ZodObjectDef
I
ZodOptionalDef
I
ZodPipelineDef
I
ZodPromiseDef
I
ZodRecordDef
I
ZodSetDef
I
ZodStringDef
I
ZodSymbolDef
I
ZodTooBigIssue
I
ZodTooSmallIssue
I
ZodTupleDef
I
ZodTypeDef
I
ZodUndefinedDef
I
ZodUnionDef
I
ZodUnknownDef
I
ZodUnrecognizedKeysIssue
I
ZodVoidDef
T
AnyZodObject
T
AnyZodTuple
T
ArrayCardinality
T
ArrayKeys
T
arrayOutputType
T
AssertArray
T
AsyncParseReturnType
T
baseObjectInputType
T
baseObjectOutputType
T
v
BRAND
T
CustomErrorParams
T
DenormalizedError
T
deoptional
T
v
DIRTY
T
Effect
T
EnumLike
T
EnumValues
T
ErrorMapCtx
T
extendShape
T
Indices
T
infer
T
inferFlattenedErrors
T
inferFormattedError
T
InnerTypeOfFunction
T
input
T
InputTypeOfTuple
T
InputTypeOfTupleWithRest
T
v
INVALID
T
IssueData
T
KeySchema
T
objectInputType
T
objectOutputType
T
ObjectPair
T
v
OK
T
OuterTypeOfFunction
T
output
T
OutputTypeOfTuple
T
OutputTypeOfTupleWithRest
T
ParseInput
T
ParseParams
T
ParsePath
T
ParsePathComponent
T
ParseReturnType
T
PreprocessEffect
T
Primitive
T
ProcessedCreateParams
T
RawCreateParams
T
RecordType
T
Refinement
T
RefinementCtx
T
RefinementEffect
T
SafeParseError
T
SafeParseReturnType
T
SafeParseSuccess
T
Scalars
T
SomeZodObject
T
StringValidation
T
SuperRefinement
T
SyncParseReturnType
T
TransformEffect
T
TypeOf
T
typeToFlattenedError
T
UnknownKeysParam
T
Values
T
Writeable
T
ZodDateCheck
T
ZodDiscriminatedUnionOption
T
ZodErrorMap
T
ZodFirstPartySchemaTypes
T
ZodFormattedError
T
ZodIssue
T
ZodIssueBase
T
v
ZodIssueCode
T
ZodIssueOptionalMessage
T
ZodNonEmptyArray
T
ZodNullableType
T
ZodNumberCheck
T
ZodOptionalType
T
v
ZodParsedType
T
ZodRawShape
T
ZodStringCheck
T
ZodTupleItems
T
ZodTypeAny
T
ZodUnionOptions
v
any
v
array
v
bigint
v
boolean
v
coerce
v
custom
v
date
v
defaultErrorMap
v
discriminatedUnion
v
effect
v
EMPTY_PATH
v
enum
v
function
v
getParsedType
v
instanceof
v
intersection
v
isAborted
v
isAsync
v
isDirty
v
isValid
v
late
v
lazy
v
literal
v
makeIssue
v
map
v
nan
v
nativeEnum
v
never
v
NEVER
v
null
v
nullable
v
number
v
object
v
oboolean
v
onumber
v
optional
v
ostring
v
pipeline
v
preprocess
v
promise
v
quotelessJson
v
record
v
set
v
strictObject
v
string
v
symbol
v
transformer
v
tuple
v
undefined
v
union
v
unknown
v
void
f
addIssueToContext
f
getErrorMap
f
setErrorMap
E
ZodFirstPartyTypeKind
types.ts
N
objectUtil
c
Schema
c
ZodAny
c
ZodArray
c
ZodBigInt
c
ZodBoolean
c
ZodBranded
c
ZodCatch
c
ZodDate
c
ZodDefault
c
ZodDiscriminatedUnion
c
ZodEffects
c
ZodEnum
c
ZodFunction
c
ZodIntersection
c
ZodLazy
c
ZodLiteral
c
ZodMap
c
ZodNaN
c
ZodNativeEnum
c
ZodNever
c
ZodNull
c
ZodNullable
c
ZodNumber
c
ZodObject
c
ZodOptional
c
ZodPipeline
c
ZodPromise
c
ZodRecord
c
ZodSchema
c
ZodSet
c
ZodString
c
ZodSymbol
c
ZodTransformer
c
ZodTuple
c
ZodType
c
ZodUndefined
c
ZodUnion
c
ZodUnknown
c
ZodVoid
I
ZodAnyDef
I
ZodArrayDef
I
ZodBigIntDef
I
ZodBooleanDef
I
ZodBrandedDef
I
ZodCatchDef
I
ZodDateDef
I
ZodDefaultDef
I
ZodDiscriminatedUnionDef
I
ZodEffectsDef
I
ZodEnumDef
I
ZodFunctionDef
I
ZodIntersectionDef
I
ZodLazyDef
I
ZodLiteralDef
I
ZodMapDef
I
ZodNaNDef
I
ZodNativeEnumDef
I
ZodNeverDef
I
ZodNullableDef
I
ZodNullDef
I
ZodNumberDef
I
ZodObjectDef
I
ZodOptionalDef
I
ZodPipelineDef
I
ZodPromiseDef
I
ZodRecordDef
I
ZodSetDef
I
ZodStringDef
I
ZodSymbolDef
I
ZodTupleDef
I
ZodTypeDef
I
ZodUndefinedDef
I
ZodUnionDef
I
ZodUnknownDef
I
ZodVoidDef
T
AnyZodObject
T
AnyZodTuple
T
ArrayCardinality
T
ArrayKeys
T
arrayOutputType
T
AssertArray
T
baseObjectInputType
T
baseObjectOutputType
T
v
BRAND
T
CustomErrorParams
T
deoptional
T
Effect
T
EnumLike
T
EnumValues
T
extendShape
T
Indices
T
infer
T
InnerTypeOfFunction
T
input
T
InputTypeOfTuple
T
InputTypeOfTupleWithRest
T
KeySchema
T
objectInputType
T
objectOutputType
T
OuterTypeOfFunction
T
output
T
OutputTypeOfTuple
T
OutputTypeOfTupleWithRest
T
PreprocessEffect
T
ProcessedCreateParams
T
RawCreateParams
T
RecordType
T
Refinement
T
RefinementCtx
T
RefinementEffect
T
SafeParseError
T
SafeParseReturnType
T
SafeParseSuccess
T
SomeZodObject
T
SuperRefinement
T
TransformEffect
T
TypeOf
T
UnknownKeysParam
T
Values
T
Writeable
T
ZodDateCheck
T
ZodDiscriminatedUnionOption
T
ZodFirstPartySchemaTypes
T
ZodNonEmptyArray
T
ZodNullableType
T
ZodNumberCheck
T
ZodOptionalType
T
ZodRawShape
T
ZodStringCheck
T
ZodTupleItems
T
ZodTypeAny
T
ZodUnionOptions
v
any
v
array
v
bigint
v
boolean
v
coerce
v
custom
v
date
v
discriminatedUnion
v
effect
v
enum
v
function
v
instanceof
v
intersection
v
late
v
lazy
v
literal
v
map
v
nan
v
nativeEnum
v
never
v
NEVER
v
null
v
nullable
v
number
v
object
v
oboolean
v
onumber
v
optional
v
ostring
v
pipeline
v
preprocess
v
promise
v
record
v
set
v
strictObject
v
string
v
symbol
v
transformer
v
tuple
v
undefined
v
union
v
unknown
v
void
E
ZodFirstPartyTypeKind
ZodError.ts
c
ZodError
I
ZodCustomIssue
I
ZodInvalidArgumentsIssue
I
ZodInvalidDateIssue
I
ZodInvalidEnumValueIssue
I
ZodInvalidIntersectionTypesIssue
I
ZodInvalidLiteralIssue
I
ZodInvalidReturnTypeIssue
I
ZodInvalidStringIssue
I
ZodInvalidTypeIssue
I
ZodInvalidUnionDiscriminatorIssue
I
ZodInvalidUnionIssue
I
ZodNotFiniteIssue
I
ZodNotMultipleOfIssue
I
ZodTooBigIssue
I
ZodTooSmallIssue
I
ZodUnrecognizedKeysIssue
T
DenormalizedError
T
ErrorMapCtx
T
inferFlattenedErrors
T
inferFormattedError
T
IssueData
T
StringValidation
T
typeToFlattenedError
T
ZodErrorMap
T
ZodFormattedError
T
ZodIssue
T
ZodIssueBase
T
v
ZodIssueCode
T
ZodIssueOptionalMessage
v
quotelessJson
variable
promise
import
{ promise }
from
"https://dotland.deno.dev/x/zod@v3.20/types.ts"
;
Why Deno?
Develop Locally
Deploy Globally
Compare to Node.js
Benchmarks
Products
Deno CLI
Deno Deploy
Deploy Subhosting
Fresh
SaaSKit
Sources
CLI Manual
CLI Runtime API
Deploy Docs
Standard Library
Third-Party Modules
Community
Artworks
Translations
Showcase
Company
Careers
Blog
Pricing
News
Merch
Privacy Policy
Copyright © 2023 Deno Land Inc.
All rights reserved.