UNPKG

419 BTypeScriptView Raw
1import { Runtype, RuntypeBase, Static } from '../runtype';
2export interface Tuple<A extends readonly RuntypeBase[]> extends Runtype<{
3 [K in keyof A]: A[K] extends RuntypeBase ? Static<A[K]> : unknown;
4}> {
5 tag: 'tuple';
6 components: A;
7}
8/**
9 * Construct a tuple runtype from runtypes for each of its elements.
10 */
11export declare function Tuple<T extends readonly RuntypeBase[]>(...components: T): Tuple<T>;