UNPKG

juniper

Version:

ESM JSON Schema builder for static Typescript inference.

17 lines (16 loc) 525 B
import { ArraySchema, ArraySchemaOverride, prefixItemsSym } from './array.js'; export class TupleSchema extends ArraySchemaOverride { constructor(options = {}){ const prefixItemsSize = options[prefixItemsSym]?.length ?? 0; super({ ...options, items: ArraySchema.falseItems, maxItems: prefixItemsSize, minItems: prefixItemsSize }); } static create(options) { return new TupleSchema(options); } } //# sourceMappingURL=tuple.js.map