UNPKG

refun

Version:

A collection of React Hook-enabled functions that compose harmoniously with each other. Similar to `recompose`, but:

11 lines (10 loc) 391 B
declare type TCoroutineProps = { cancelOthers: () => void; index: number; }; declare type GeneratorFactory = (props: TCoroutineProps) => Generator<Promise<any>, void, any>; declare type RefObject<T> = { current: T; }; export declare const onUpdateAsync: <P extends {}>(onUpdateFn: (props: RefObject<P>) => GeneratorFactory, watchKeys: (keyof P)[]) => (props: P) => P; export {};