Skip to content

or

or<T>(…choices): TypeWrapper<UnwrapTypes<T>>

Defined in: .work/repos/edinburgh/src/types.ts:737

Create a union type wrapper from multiple type choices.

T extends (TypeWrapper<unknown> | BasicType)[]

Array of type wrapper or basic types.

T

The type choices for the union.

TypeWrapper<UnwrapTypes<T>>

A union type instance.

const stringOrNumber = E.or(E.string, E.number);
const status = E.or("active", "inactive", "pending");