import { type ArrayGenerator, type ConstExpr } from '@skyleague/axioms'; import type { NodeTrait } from '../../cst/mixin.js'; import { Node } from '../../cst/node.js'; import type { SchemaOptions } from '../base.js'; export interface ArrayOptions { /** * The minimum amount of items this array has. */ minItems?: number | undefined; /** * The maximum amount of items this array has. */ maxItems?: number | undefined; /** * Checks whether all items are unique. */ set?: boolean | undefined; arbitrary?: Partial> | undefined; } export declare class ArrayType extends Node { _children: [Node]; _type: "array"; _options: ArrayOptions; element: Element; infer: Element['infer'][]; input: Element['input'][]; _isCommutative: boolean; constructor(items: ConstExpr, options: SchemaOptions); arbitrary(options: Partial>): this; minItems(minItems: number): this; nonempty(): this; maxItems(maxItems: number): this; set(): this; } export interface ArrayType extends Node, NodeTrait { } /** * Create a new `ArrayType` instance with the given options. * * ### Example * ```ts * $array($integer) * * $array($boolean()) * ``` * * @param items - The items on this array. * @param options - Additional options to pass to the array. * * @group Primitives */ export declare function $array(items: ConstExpr, options?: SchemaOptions): ArrayType;