refun
Version:
A collection of React Hook-enabled functions that compose harmoniously with each other. Similar to `recompose`, but:
5 lines (4 loc) • 471 B
TypeScript
import type { TExtend } from 'tsfn';
export declare type TSetSafeTimeout = (cb: () => void, delay: number) => () => void;
export declare const mapSafeTimeoutFactory: (setTimeoutFn: Function, clearTimeoutFn: Function) => <K extends string>(propName: K) => <P extends {}>(props: P) => TExtend<P, { [k in K]: TSetSafeTimeout; }>;
export declare const mapSafeTimeout: <K extends string>(propName: K) => <P extends {}>(props: P) => TExtend<P, { [k in K]: TSetSafeTimeout; }>;