UNPKG

json-schema-to-typescript

Version:
8 lines (6 loc) 242 B
import {Options} from '.' export function validateOptions({maxItems}: Partial<Options>): void { if (maxItems !== undefined && maxItems < -1) { throw RangeError(`Expected options.maxItems to be >= -1, but was given ${maxItems}.`) } }