25 lines
537 B
TypeScript
25 lines
537 B
TypeScript
/**
|
|
* Copyright (c) 2026 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
/**
|
|
* Returns a Promise that resolves on the next engine frame.
|
|
*
|
|
* @example
|
|
* await frame();
|
|
* Console.print('one frame later');
|
|
*/
|
|
declare function frame(): Promise<void>;
|
|
|
|
/**
|
|
* Returns a Promise that resolves after `ms` milliseconds of engine time.
|
|
*
|
|
* @example
|
|
* await timeout(500);
|
|
* Console.print('half a second later');
|
|
*/
|
|
declare function timeout(ms: number): Promise<void>;
|