Skip to main content
Module

x/value_schema/src/schemas/array.ts

simple, easy-to-use, and declarative input validator; supports Node.js, TypeScript, and Deno
Go to Latest
File
import {NullableOptions} from "../libs/publicTypes";import {ArraySchema, OptionsForArray} from "../schemaClasses/ArraySchema";
export function array<T>(options: OptionsForArray<T> & NullableOptions): ArraySchema<T, null>export function array<T>(options: OptionsForArray<T>): ArraySchema<T>export function array<T>(): ArraySchema<T>
/** * create schema * @param options Options * @returns schema */export function array<T>(options: OptionsForArray<T> = {}): ArraySchema<T>{ return new ArraySchema<T>(options);}