import { AbstractType } from "./AbstractType"; import { AnyType } from "./AnyType"; import { conversion, Req, scalar } from "@huz-com/types"; declare type T = scalar.AnyArray; declare type O = conversion.CastBaseArray; /** * @class * */ export declare class ArrayType extends AbstractType implements conversion.BeGeneric { protected static _ins: ArrayType; protected _anyType: AnyType; private _genericName; /** * Returns skeleton instance * */ static ins(): ArrayType; constructor(); /** * Is not-empty or filled * * @override * */ protected _notEmpty(value: T): boolean; /** * Checks is array? */ is(value: scalar.Unknown, opt?: O, req?: Req): boolean; /** * Converts a value to array */ cast(value: scalar.Unknown, opt?: O, req?: Req): T; /** * Converts a value to typed array */ castTyped(value: scalar.Unknown | Array, opt?: O, req?: Req, fn?: conversion.CastFn): Array; get genericName(): string; /** * Cast any type array */ withGeneric(generics: Array, values: scalar.Unknown, title?: scalar.Title): Array; /** * Shuffles items in an array */ shuffle(values: Array): Array; /** * Removes duplicated items in an array */ unique(values: Array): Array; /** * Keep array items with given key values * */ keepOrders(items: Array, keys: Array, field: string): Array; /** * Get first item of an array */ first(values: Array): E | null; /** * Get last item of an array */ last(values: Array): E | null; } export {};