Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | import { ArrayLocale, MixedLocale } from './Locale'
import { GetSchema, MixedSchema } from './mixed'
import { Refable } from './ref'
export interface ArraySchema<T extends any = any> extends MixedSchema<T[]> {
of(type: GetSchema<T>): this
required(message?: MixedLocale['required']): this
min(limit: Refable<number>, message?: ArrayLocale['min']): this
max(limit: Refable<number>, message?: ArrayLocale['max']): this
ensure(): this
compact(rejector: (value: T) => boolean): this
}
export declare function array<T extends any = any>(
type?: GetSchema<T> | ((schema: ArraySchema<T>) => ArraySchema<T>),
): ArraySchema<T>
|