UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

30 lines (29 loc) 986 B
import { Endomorphism, Effect } from "./types"; export declare const Mutable: <T>(clone: Endomorphism<T>) => (initialValue: T) => { set: (newValue: T) => void; update: (fn: Endomorphism<T>) => void; change: (fn: Effect<T>) => void; value: () => T; toString: () => string; }; export declare const MutableArray: <T>(coll: T[]) => { set: (newValue: T[]) => void; update: (fn: Endomorphism<T[]>) => void; change: (fn: Effect<T[]>) => void; value: () => T[]; toString: () => string; }; export declare const MutableObject: <T extends Record<string, any>>(obj: T) => { set: (newValue: T) => void; update: (fn: Endomorphism<T>) => void; change: (fn: Effect<T>) => void; value: () => T; toString: () => string; }; export declare const MutablePrimitive: <T>(value: T) => { set: (newValue: T) => void; update: (fn: Endomorphism<T>) => void; change: (fn: Effect<T>) => void; value: () => T; toString: () => string; };