import { Pausable } from '@solidjs-use/shared'; import { ConfigurableWindow } from '../_configurable.js'; interface UseRafFnCallbackArguments { /** * Time elapsed between this and the last frame. */ delta: number; /** * Time elapsed since the creation of the web page. See {@link https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp#the_time_origin Time origin}. */ timestamp: DOMHighResTimeStamp; } interface UseRafFnOptions extends ConfigurableWindow { /** * Start the requestAnimationFrame loop immediately on creation * * @default true */ immediate?: boolean; } /** * Call function on every `requestAnimationFrame`. With controls of pausing and resuming. * * @see https://solidjs-use.github.io/solidjs-use/core/useRafFn */ declare function useRafFn(fn: (args: UseRafFnCallbackArguments) => void, options?: UseRafFnOptions): Pausable; export { UseRafFnCallbackArguments, UseRafFnOptions, useRafFn };