@studiometa/js-toolkit
Version:
A set of useful little bits of JavaScript to boost your project! 🚀
9 lines (8 loc) • 345 B
TypeScript
type Callback = (time?: DOMHighResTimeStamp) => any;
/**
* Wait for the next frame to execute a function.
* @link https://js-toolkit.studiometa.dev/utils/nextFrame.html
*/
export declare function nextFrame(): Promise<DOMHighResTimeStamp>;
export declare function nextFrame<T extends Callback>(callback?: T): Promise<ReturnType<T>>;
export {};