import { Array, Object, Optional, type Parsed, Record, String, Undefined, Union, Unknown } from 'runtypes'; // This file is generated by runtyping (https://github.com/johngeorgewright/runtyping). // Manual changes might be lost - proceed with caution! export const ExampleSchema = Object({ testArray: Optional(Union(Array(Unknown).withConstraint<[{ [k: string]: unknown; }, { [k: string]: unknown; }, ...{ [k: string]: unknown; }[]]>(data => data.length >= 2 && Record(String, Unknown).guard(data[0]) && Record(String, Unknown).guard(data[1]) && Array(Record(String, Unknown)).guard(data.slice(2, undefined)) ), Undefined,)), }); export type ExampleSchema = Parsed;