Function: union()

union<TSchema, TContext>(types): IUnionSchema<InferType<TSchema> | undefined, TContext>

Type Parameters

TSchema extends Schema<any, any, any, "">

TContext extends Maybe<AnyObject> = AnyObject

Parameters

types: readonly TSchema[]

Returns

IUnionSchema<InferType<TSchema> | undefined, TContext>

Defined in

packages/yup/src/union.ts:18