UNPKG

object-shape-tester

Version:
29 lines (28 loc) 658 B
import { type ShapeInitSchema } from '../shape/shape.js'; /** * Creates a shape that requires a tuple. * * @category Shape * @example * * ```ts * import {tupleShape, checkValidShape} from 'object-shape-tester'; * * const myShape = tupleShape('', -1); * * checkValidShape( * [ * 'a', * 10, * ], * myShape, * ); // `true` * checkValidShape( * [ * 'a', * ], * myShape, * ); // `false` * ``` */ export declare function tupleShape<T extends any[]>(...tupleParts: T): import("../shape/shape.js").Shape<import("@sinclair/typebox").TTuple<{ [Index in keyof T]: ShapeInitSchema<T[Index]>; }>>;