//needs to be updated!!!! declare module 'brisk-control' { import { CurriedFunction2 } from 'ramda'; interface Action { exec(reject: (v: E) => void, resolve: (v: A) => void): void; ap(f: any): any; map(fb: (e: A) => A2): Action; bimap(errFn: (value: E) => E2, successFn: (value: A) => A2): Action; chain(fn: (v: A) => Action): Action; chainReject(fn: (value: E) => Action): Action; } interface ActionStatic { (fn: (reject: (v: E) => void, resolve: (v: A) => void) => void): Action new (fn: (reject: (v: E) => void, resolve: (v: A) => void) => void): Action; cache(f: Action): Action; of(x: A): Action; reject(val: E): Action; exec(reject: (v: E) => void, resolve: (v: A) => void, Action:Action): void; } export const Action: ActionStatic; interface IO { ap(thatIo: IO): IO; chain(fn: (value: T) => IO): IO; map(fn: (value: T) => T2): IO; runIO(): T; } interface IOStatic { (fn: () => T): IO; new (fn: () => T): IO; of(x: T): IO; runIO(io: IO): T; } export const IO: IOStatic; interface Identity { ap(app: Identity): Identity; chain(fn: (value: T) => Identity): Identity; map(fn: (value: T) => T2): Identity; } interface IdentityStatic { (value: T): Identity; new (value: T): Identity; of(x: T): Identity; } export const Identity: IdentityStatic; interface Either { chain(f: (e: Either) => T): Either; ap(f: (e: R) => Either): Either; extend(f: (e: Either) => T): Either; equals(that: Either): boolean; bimap(lf: (value: L) => L2, rf: (value: R) => R2): Either; map(fn: (e: R) => T): Either; } interface EitherStatic { Left(value: L): Either; Right(value: R): Either; either(left: (value: L) => T, right: (value: R) => T, e: Either): T; either(left: (value: L) => T, right: (value: R) => T): (e: Either) => T; either(left: (value: L) => T): CurriedFunction2<(value: R) => T, Either, T>; isLeft(x: Either): boolean; isRight(x: Either): boolean; of(value: R): Either; } export const Either: EitherStatic; interface Maybe { getOrElse(value: T): T; map(fn: (vlaue: T) => T2): Maybe; ap(m: Maybe): Maybe; chain(fn: (value: T) => Maybe): Maybe; // reduce(fn: ()); equals(m: Maybe): boolean; } interface MaybeStatic { Just(value: T): Maybe; Nothing(): Maybe; isJust(x: Maybe): boolean; isNothing(x: Maybe): boolean; maybe(seed: T2, fn: (value: T) => T2, m: Maybe): T2; maybe(seed: T2, fn: (value: T) => T2): (m: Maybe) => T2; maybe(seed: T2): CurriedFunction2<(value: T) => T2, Maybe, T2>; of(x: T): Maybe; } export const Maybe: MaybeStatic; export const State: any; export const Tuple:any; }