requestanimationframe-timer
Version:
setTimeout and setInterval by using requestAnimationFrame
13 lines (12 loc) • 624 B
TypeScript
declare function removeId(id?: number): void;
export declare const setTimeout: (fn: Function, ms?: number, ...args: any[]) => number | null;
export declare const clearTimeout: typeof removeId;
export declare const setInterval: (fn: Function, ms?: number, ...args: any[]) => number | null;
export declare const clearInterval: typeof removeId;
declare const _default: {
setTimeout: (fn: Function, ms?: number, ...args: any[]) => number | null;
clearTimeout: typeof removeId;
setInterval: (fn: Function, ms?: number, ...args: any[]) => number | null;
clearInterval: typeof removeId;
};
export default _default;