zs-control
Version:
State management inspired by Zustand with strong TypeScript typing.
5 lines (4 loc) • 397 B
TypeScript
export declare const pipe: <TInput, TOutput>(...fns: [(arg: TInput) => any, ...Array<(arg: any) => any>, (arg: any) => TOutput]) => (input: TInput) => TOutput;
export declare const compose: <T>(...fns: Array<(arg: T) => T>) => ((x: T) => T);
export declare const memoize: <T extends (...args: any[]) => any>(fn: T) => T;
export declare const once: <T extends (...args: any[]) => any>(fn: T) => T;