Files
emaui/node_modules/@mantine/hooks/lib/use-interval/use-interval.d.ts
2026-05-29 15:23:46 +03:00

16 lines
579 B
TypeScript

export interface UseIntervalOptions {
/** If set, the interval will start automatically when the component is mounted, `false` by default */
autoInvoke?: boolean;
}
export interface UseIntervalReturnValue {
/** Starts the interval */
start: () => void;
/** Stops the interval */
stop: () => void;
/** Toggles the interval */
toggle: () => void;
/** Indicates if the interval is active */
active: boolean;
}
export declare function useInterval(fn: () => void, interval: number, { autoInvoke }?: UseIntervalOptions): UseIntervalReturnValue;