Schema
<TType
, TContext
, TDefault
, TFlags
>• TType = any
• TContext = AnyObject
• TDefault = undefined
• TFlags extends Flags
= ""
IUnionSchema
<TType
, TContext
, TDefault
, TFlags
>new UnionSchema<
TType
,TContext
,TDefault
,TFlags
>(types
):UnionSchema
<TType
,TContext
,TDefault
,TFlags
>
• types: readonly Schema
<any
, any
, any
, ""
>[]
UnionSchema
<TType
, TContext
, TDefault
, TFlags
>
Schema<TType, TContext, TDefault, TFlags>.constructor
packages/yup/src/union.ts:38
readonly
__context:TContext
Schema.__context
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:162
readonly
__default:TDefault
Schema.__default
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:165
readonly
__flags:TFlags
Schema.__flags
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:163
readonly
__isYupSchema__:boolean
Schema.__isYupSchema__
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:164
readonly
__outputType:ResolveFlags
<TType
,TFlags
,TDefault
>
Schema.__outputType
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:161
protected
_blacklist:ReferenceSet
Schema._blacklist
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:173
protected
_typeCheck: (value
) =>value is NonNullable<TType>
• value: any
value is NonNullable<TType>
Schema._typeCheck
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:175
protected
_whitelist:ReferenceSet
Schema._whitelist
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:172
readonly
deps: readonlystring
[]
Schema.deps
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:166
equals: <
U
>(enums
,message
?) =>this
(enums
,message
) =>any
• U extends any
• enums: readonly (Reference
<unknown
> | U
)[]
• message?: Message
<object
>
this
• enums: readonly any
[]
• message: Message
<object
>
any
Schema.equals
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:261
protected
exclusiveTests:Record
<string
,boolean
>
Schema.exclusiveTests
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:174
is: <
U
>(enums
,message
?) =>this
(enums
,message
) =>any
• U extends any
• enums: readonly (Reference
<unknown
> | U
)[]
• message?: Message
<object
>
this
• enums: readonly any
[]
• message: Message
<object
>
any
Schema.is
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:262
nope: <
U
>(enums
,message
?) =>this
• U extends any
• enums: readonly (Reference
<unknown
> | Maybe
<U
>)[]
• message?: Message
<object
>
this
Schema.nope
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:264
not: <
U
>(enums
,message
?) =>this
• U extends any
• enums: readonly (Reference
<unknown
> | Maybe
<U
>)[]
• message?: Message
<object
>
this
Schema.not
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:263
spec:
UnionSchemaSpec
Schema.spec
packages/yup/src/union.ts:36
tests:
Test
[]
Schema.tests
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:167
transforms:
TransformFunction
<AnySchema
<any
,any
,any
,Flags
>>[]
Schema.transforms
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:168
readonly
type:string
Schema.type
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:160
get
_type():string
string
Schema._type
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:178
protected
_cast(rawValue
,options
):any
• rawValue: any
• options: CastOptions$1
<TContext
>
any
Schema._cast
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:194
protected
_getDefault(options
?):any
• options?: ResolveOptions
<TContext
>
any
Schema._getDefault
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:206
protected
_validate(_value
,options
,panic
,next
):void
• _value: any
• options: undefined
| InternalOptions
<TContext
>
• panic
• next
void
Schema._validate
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:195
asNestedTest(
__namedParameters
):RunTest
• __namedParameters: NestedTestConfig
RunTest
Schema.asNestedTest
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:201
cast(
value
,options
):any
Run the configured transform pipeline over an input value.
• value: any
• options: any
any
Schema.cast
packages/yup/src/union.ts:48
clone(
spec
?):this
• spec?: Partial
<SchemaSpec
<any
>>
this
Schema.clone
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:179
concat(
schema
):this
• schema: this
this
Schema.concat
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:184
concat(
schema
):AnySchema
<any
,any
,any
,Flags
>
• schema: AnySchema
<any
, any
, any
, Flags
>
AnySchema
<any
, any
, any
, Flags
>
Schema.concat
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:185
default(
def
):any
• def: any
any
Schema.default
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:208
defined(
message
?):any
• message?: Message
<any
>
any
Schema.defined
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:213
describe(...
arg
):SchemaInnerTypeDescription
Return a serialized description of the schema including validations, flags, types etc.
• ...arg: [ResolveOptions
<any
>]
Provide any needed context for resolving runtime schema alterations (lazy, when conditions, etc).
SchemaInnerTypeDescription
Schema.describe
packages/yup/src/union.ts:75
findTargetSchema(
value
):Promise
<undefined
|Schema
<any
,any
,any
,""
>>
• value: any
Promise
<undefined
| Schema
<any
, any
, any
, ""
>>
packages/yup/src/union.ts:101
findTargetSchemaSync(
value
):undefined
|Schema
<any
,any
,any
,""
>
• value: any
undefined
| Schema
<any
, any
, any
, ""
>
IUnionSchema
.findTargetSchemaSync
packages/yup/src/union.ts:108
getDefault(
options
?):TDefault
• options?: ResolveOptions
<TContext
>
TDefault
Schema.getDefault
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:207
isType(
v
):v is TType
• v: unknown
v is TType
Schema.isType
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:186
isValid(
value
,options
?):Promise
<boolean
>
• value: any
• options?: ValidateOptions
<TContext
>
Promise
<boolean
>
Schema.isValid
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:204
isValidSync(
value
,options
?):value is ResolveFlags<TType, TFlags, TDefault>
• value: any
• options?: ValidateOptions
<TContext
>
value is ResolveFlags<TType, TFlags, TDefault>
Schema.isValidSync
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:205
label(
label
):this
• label: string
this
Schema.label
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:180
meta():
undefined
|CustomSchemaMetadata
undefined
| CustomSchemaMetadata
Schema.meta
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:181
meta(
obj
):this
• obj: CustomSchemaMetadata
this
Schema.meta
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:182
nonNullable(
message
?):any
• message?: Message
<any
>
any
Schema.nonNullable
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:215
notOneOf<
U
>(enums
,message
?):this
• U
• enums: readonly (Reference
<unknown
> | Maybe
<U
>)[]
• message?: Message
<object
>
this
Schema.notOneOf
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:247
notRequired():
any
any
Schema.notRequired
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:217
protected
nullability(nullable
,message
?):this
• nullable: boolean
• message?: Message
<any
>
this
Schema.nullability
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:210
nullable():
any
any
Schema.nullable
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:214
oneOf<
U
>(enums
,message
?):this
• U
• enums: readonly (U
| Reference
<unknown
>)[]
• message?: Message
<object
>
this
Schema.oneOf
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:241
oneOf(
enums
,message
):any
• enums: readonly (TType
| Reference
<unknown
>)[]
• message: Message
<object
>
any
Schema.oneOf
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:244
optional():
any
any
Schema.optional
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:212
protected
optionality(optional
,message
?):this
• optional: boolean
• message?: Message
<any
>
this
Schema.optionality
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:211
required(
message
?):any
• message?: Message
<any
>
any
Schema.required
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:216
resolve(
options
):this
• options: ResolveOptions
<TContext
>
this
Schema.resolve
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:187
protected
resolveOptions<T
>(options
):T
• T extends InternalOptions
<any
>
• options: T
T
Schema.resolveOptions
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:188
protected
runTests(runOptions
,panic
,next
):void
Executes a set of validations, either schema, produced Tests or a nested schema validate result.
• runOptions: TestRunOptions
• panic
• next
void
Schema.runTests
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:200
strict(
isStrict
?):this
• isStrict?: boolean
this
Schema.strict
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:209
strip(
strip
?):any
• strip?: boolean
any
Schema.strip
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:250
test(
options
):this
Adds a test function to the schema's queue of tests. tests can be exclusive or non-exclusive.
If a non-exclusive test is added to a schema with an exclusive test of the same name the exclusive test is removed and further tests of the same name will be stacked.
If an exclusive test is added to a schema with non-exclusive tests of the same name the previous tests are removed and further tests of the same name will replace each other.
• options: TestConfig
<ResolveFlags
<TType
, TFlags
, TDefault
>, TContext
>
this
Schema.test
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:232
test(
test
):this
• test: TestFunction
<ResolveFlags
<TType
, TFlags
, TDefault
>, TContext
>
this
Schema.test
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:233
test(
name
,test
):this
• name: string
• test: TestFunction
<ResolveFlags
<TType
, TFlags
, TDefault
>, TContext
>
this
Schema.test
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:234
test(
name
,message
,test
):this
• name: string
• message: Message
<any
>
• test: TestFunction
<ResolveFlags
<TType
, TFlags
, TDefault
>, TContext
>
this
Schema.test
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:235
transform(
fn
):this
• fn: TransformFunction
<UnionSchema
<TType
, TContext
, TDefault
, TFlags
>>
this
Schema.transform
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:218
typeError(
message
):this
• message: Message
<any
>
this
Schema.typeError
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:240
validate(...
args
):Promise
<any
>
• ...args: [any
, ValidateOptions
<any
>]
Promise
<any
>
Schema.validate
packages/yup/src/union.ts:54
validateAt(
path
,value
,options
?):Promise
<any
>
• path: string
• value: any
• options?: ValidateOptions
<TContext
>
Promise
<any
>
Schema.validateAt
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:259
validateNil(
value
):boolean
• value: any
boolean
packages/yup/src/union.ts:95
validateSync(...
args
):any
• ...args: [any
, ValidateOptions
<any
>]
any
Schema.validateSync
packages/yup/src/union.ts:65
validateSyncAt(
path
,value
,options
?):any
• path: string
• value: any
• options?: ValidateOptions
<TContext
>
any
Schema.validateSyncAt
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:260
when(
builder
):this
• builder: ConditionBuilder
<UnionSchema
<TType
, TContext
, TDefault
, TFlags
>>
this
Schema.when
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:236
when(
keys
,builder
):this
• keys: string
| string
[]
• builder: ConditionBuilder
<UnionSchema
<TType
, TContext
, TDefault
, TFlags
>>
this
Schema.when
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:237
when(
options
):this
• options: ConditionConfig
<UnionSchema
<TType
, TContext
, TDefault
, TFlags
>>
this
Schema.when
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:238
when(
keys
,options
):this
• keys: string
| string
[]
• options: ConditionConfig
<UnionSchema
<TType
, TContext
, TDefault
, TFlags
>>
this
Schema.when
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:239
withMutation<
T
>(fn
):T
• T
• fn
T
Schema.withMutation
node_modules/.pnpm/yup@1.4.0/node_modules/yup/index.d.ts:183