@linzjs/step-ag-grid
Version:
[](https://github.com/semantic-release/semantic-release) > Reusable [ag-grid](https://www.ag-grid.com/) component for LINZ / Toitū te whenua.
9 lines (8 loc) • 425 B
TypeScript
/**
* Cancels timeouts on scope being destroyed.
*
* This could almost be a debounce, but debounce tracks by function reference, this tracks by hook reference.
* This could have been implemented using debounce if the callers function was wrapped in useCallback,
* but there's no way to enforce that, so it would lead to bugs.
*/
export declare const useTimeoutHook: () => (fn: () => void, waitTimeMs: number) => void;