9 lines
318 B
TypeScript
9 lines
318 B
TypeScript
|
export type UseSetIntervalReturnType = {
|
||
|
setInterval: (callback: () => void, duration: number) => number;
|
||
|
clearInterval: (id: number) => void;
|
||
|
};
|
||
|
/**
|
||
|
* Returns a wrapper function for `setInterval` which automatically handles disposal.
|
||
|
*/
|
||
|
export declare const useSetInterval: () => UseSetIntervalReturnType;
|