succulent
Version:
Powerful and easy runtime type checking
8 lines (7 loc) • 390 B
TypeScript
import { Schema, SchemaBase } from "../schema.js";
export declare function union<T extends readonly unknown[]>(...schemas: readonly [...Schema.WrapAll<T>]): Schema<T[number]>;
/**
* @deprecated Use `union` instead
*/
export declare function or<X, Y>(x: SchemaBase<X>, y: SchemaBase<Y>): Schema<X | Y>;
export declare function and<X, Y>(x: SchemaBase<X>, y: SchemaBase<Y>): Schema<X & Y>;