export type Falsy = false | '' | null | undefined | 0 export type Primitive = null | undefined | string | number | boolean | symbol export type PathLinks = (string | number | symbol)[] export type ArrayIterator = (value: T, key: number, collection: T[]) => R export type MapIterator = (value: V, key: K, collection: Map) => R export type ObjectIterator = (value: T[keyof T], key: keyof T, collection: T) => R export type SetIterator = (value: T, key: T, collection: Set) => R export type StringIterator = (value: string, key: number, collection: string) => R export type ArrayAccumulator = (accumulator: U, value: T, key: number, collection: T[]) => U export type MapAccumulator = (accumulator: U, value: V, key: K, collection: Map) => U export type ObjectAccumulator = (accumulator: U, value: T[keyof T], key: keyof T, collection: T) => U export type SetAccumulator = (accumulator: U, value: T, key: T, collection: Set) => U export type StringAccumulator = (accumulator: U, value: string, key: number, collection: T) => U export type GenericCollection = | string | T[] | Record | Set | Map export type MapKey = T extends Map ? K : never export type MapValue = T extends Map ? V : never export type IterableValue = T extends Iterable ? V : never export type Callable = (...args: any[]) => any export type ElementType < T extends { [P in K & any]: any }, K extends keyof T | number > = T[K] export type ValidPropertyKey = T extends PropertyKey ? T : string export type ParamType = ElementType, P> export type Param1 = F extends (...args: [infer T1, ...any[]]) => any ? T1 : never export type Param2 = F extends (a: any, b: infer T2) => any ? T2 : never export type Param3 = F extends (...args: [any, any, infer T3, ...any[]]) => any ? T3 : never export type Param4 = F extends (...args: [any, any, any, infer T4, ...any[]]) => any ? T4 : never export type Param5 = F extends (...args: [any, any, any, any, infer T5, ...any[]]) => any ? T5 : never export type Param6 = F extends (...args: [any, any, any, any, any, infer T6, ...any[]]) => any ? T6 : never export type Then = T extends PromiseLike ? A : T export type PipeFunction = (value: Then) => R export type Tuple = [T, T]