Skip to main content
Module

x/value_schema/dist-deno/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.ts";import { ArraySchema, OptionsForArray } from "../schemaClasses/ArraySchema.ts";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);}