veffect
Version:
powerful TypeScript validation library built on the robust foundation of Effect combining exceptional type safety, high performance, and developer experience. Taking inspiration from Effect's functional principles, VEffect delivers a balanced approach tha
17 lines (16 loc) • 665 B
TypeScript
import { Schema, RefinableSchema, TransformableSchema, DefaultableSchema, NullableSchema } from '../types';
/**
* Tuple schema interface
*/
export interface TupleSchema<T extends any[]> extends Schema<T>, RefinableSchema<T, TupleSchema<T>>, TransformableSchema<T, TupleSchema<T>>, DefaultableSchema<T, TupleSchema<T>>, NullableSchema<T, TupleSchema<T>> {
readonly _tag: 'TupleSchema';
readonly schemas: {
[]: Schema<T[K]>;
};
}
/**
* Create a schema for a fixed-length array (tuple) with specific element types
*/
export declare function tuple<T extends any[]>(...schemas: {
[K in keyof T]: Schema<T[K]>;
}): TupleSchema<T>;