UNPKG

@bemedev/types

Version:

Type definitions for Bemedev projects

23 lines 1.7 kB
import type { AnyArray, Checker, Checker2, ExcludeArray, ExtractArray, IndexesOfArray, ReverseArray, RuA, ToArray, TupleOf, UnionToTuple } from '../types/types'; export declare const arrays: import("../utils.js").FnBasic<(<T>(...values: T[]) => T[]), { readonly low: <T extends unknown[]>(...values: T) => T; readonly is: <T>(value: unknown) => value is Array<T>; readonly indexes: <const T extends RuA>(...array: T) => UnionToTuple<IndexesOfArray<T>>; readonly lengthOf: <T extends RuA>(...array: T) => T["length"]; readonly tupleOf: import("../utils.js").FnBasic<(<const T extends RuA>(...args: T) => T), { readonly number: import("../utils.js").FnBasic<(<const T, N extends number>(data: T, times: N) => TupleOf<T, N>), { readonly is: <T>(fn: Checker2<T>) => <L extends number>(value: unknown, length: L) => value is TupleOf<T, L>; }>; readonly is: <const T>(fn: Checker<T>) => (value: unknown) => value is Array<T>; }>; readonly reduce: <T>(value: T | readonly [T] | [T]) => T; readonly toArray: <T>(value: T) => ToArray<T>; readonly reverse: <T extends RuA>(...args: T) => ReverseArray<T>; readonly freeze: <const T extends any[]>(...args: T) => Readonly<T>; readonly extract: <const T extends any[], const Ex extends T[number][]>(array: T, ...extractors: Ex) => ExtractArray<T, Ex[number]>; readonly exclude: <const T extends any[], const Ex extends T[number][]>(array: T, ...excludes: Ex) => ExcludeArray<T, Ex[number]>; readonly forceCast: (value: unknown) => unknown[]; readonly dynamic: <T extends AnyArray>(value: T) => T; readonly type: ArrayConstructor; }>; //# sourceMappingURL=arrays.d.ts.map