export declare enum adtn { ap = "babakness/ap", map = "babakness/map", chain = "babakness/chain", flatMap = "babakness/flatMap" } declare global { interface ArrayConstructor { _URI: 'Array'; } interface Array { [adtn.ap]: (a: any) => Array; of: Array; } } export declare type EntryKeyValue = A extends [infer KEY, infer VALUE] ? [KEY, VALUE] : undefined; export declare type EntryKey = A extends [infer KEY, infer VALUE] ? KEY : undefined; export declare type EntryValue = A extends [infer KEY, infer VALUE] ? VALUE : undefined; export declare type Flat = number | string | symbol; export declare type Entry = [Flat, A][]; export declare type Obj = { [k: string]: T; }; export declare type Predicate = (x: A) => boolean; export declare type Predicate2 = (x: A, y: B) => boolean; export declare type Complement = Exclude extends never ? boolean : Exclude; export declare type FlattenArray = T extends any[][] ? T[number] : T; export declare type Omit = T extends any ? Pick> : never; export declare type Optional = T extends any ? Omit & { [P in K]?: T[K]; } : never; export declare type ValueAt = G[I]; export declare type ValueOf = T[keyof T]; export declare type KeyTypes = string | number | symbol; export declare type Unpacked = T extends (infer U)[] ? U : T extends (...args: any[]) => infer U ? U : T extends Promise ? U : T; export declare type Function1 = (a: A) => B; export declare type Function2 = (a: A, b: B) => C; export declare type Function3 = (a: A, b: B, c: C) => D; export declare type Function4 = (a: A, b: B, c: C, d: D) => E; export declare type Function5 = (a: A, b: B, c: C, d: D, e: E) => F; export declare type Function6 = (a: A, b: B, c: C, d: D, e: E, f: F) => G; export declare type Function7 = (a: A, b: B, c: C, d: D, e: E, f: F, g: G) => H; export declare type Function8 = (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H) => I; export declare type Function9 = (a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I) => J; export declare type FunctionV = (...a: A[]) => B; export declare type Function_21 = (a: A, b: B) => (c: C) => D; export declare type Function_211 = (a: A, b: B) => (c: C) => (d: D) => E; export declare type Function_22 = (a: A, b: B) => (c: C, d: D) => E; export declare type Function_31 = (a: A, b: B, c: C) => (d: D) => E; export declare type Function_2111 = (a: A, b: B) => (c: C) => (d: D) => (e: E) => F; export declare type Function_311 = (a: A, b: B, c: C) => (d: D) => (e: E) => F; export declare type Function_41 = (a: A, b: B, c: C, d: D) => (e: E) => F; export declare type Function_51 = (a: A, b: B, c: C, d: D, e: E) => (f: F) => G; export declare type Function_61 = (a: A, b: B, c: C, d: D, e: E, f: F) => (g: G) => H; export declare type Curried2 = (a: A) => (b: B) => C; export declare type Curried3 = (a: A) => (b: B) => (c: C) => D; export declare type Curried4 = (a: A) => (b: B) => (c: C) => (d: D) => E; export declare type Curried5 = (a: A) => (b: B) => (c: C) => (d: D) => (e: E) => F; export declare type Curried6 = (a: A) => (b: B) => (c: C) => (d: D) => (e: E) => (f: F) => G; export declare type Curried7 = (a: A) => (b: B) => (c: C) => (d: D) => (e: E) => (f: F) => (g: G) => H; export declare type Curried8 = (a: A) => (b: B) => (c: C) => (d: D) => (e: E) => (f: F) => (g: G) => (h: H) => I; export declare type Curried9 = (a: A) => (b: B) => (c: C) => (d: D) => (e: E) => (f: F) => (g: G) => (h: H) => (i: I) => J; export interface Functor { map(fn: Function1): Functor; } export interface Apply extends Functor { ap(fn: Apply<(a: A) => B>): Apply; } export interface ArrayApply extends Functor { [adtn.ap](fn: Apply<(a: A) => B>): ArrayApply; } export interface Applicative { of(val: A): Apply; } export interface Applicative { of(val: A): Apply; } export interface ArrayApplicative { _URI: F; of(val: A): ArrayApply; } export interface Filterable { filter(fn: Predicate): Filterable; } export interface HKT0 { readonly _URI: F; } export interface Pushable { readonly concat: (item: A) => Pushable; } export interface Concattable { readonly concat: (item: A) => Concattable; } export interface PossiblyCurried { (b: B, a: A): Z; (b: B): (a: A) => Z; } export declare type ToTuple = T extends any[] ? T : any[]; export declare type Head = Tuple extends [infer H, ...any[]] ? H : never; export declare type Tail = ((...t: Tuple) => void) extends ((h: any, ...rest: infer R) => void) ? R : never;