UNPKG

@sinclair/typebox

Version:

Json Schema Type Builder with Static Type Resolution for TypeScript

17 lines (15 loc) 432 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Array = void 0; const type_1 = require("../clone/type"); const index_1 = require("../symbols/index"); /** `[Json]` Creates an Array type */ function Array(schema, options = {}) { return { ...options, [index_1.Kind]: 'Array', type: 'array', items: (0, type_1.CloneType)(schema), }; } exports.Array = Array;