mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-02 22:59:31 +08:00
15 lines
394 B
Text
15 lines
394 B
Text
export interface Task {
|
|
abort(): void;
|
|
promise: Promise<void>;
|
|
}
|
|
declare type TaskCallback = (now: number) => boolean | void;
|
|
/**
|
|
* For testing purposes only!
|
|
*/
|
|
export declare function clear_loops(): void;
|
|
/**
|
|
* Creates a new task that runs on each raf frame
|
|
* until it returns a falsy value or is aborted
|
|
*/
|
|
export declare function loop(callback: TaskCallback): Task;
|
|
export {};
|