* Returns a promise that resolves when a requestAnimationFrame has completed. * * On Node.js this uses setImmediate instead of requestAnimationFrame. * * This is simply a sugar method so that users can do the following: * `await tf.nextFrame();` * * @doc {heading: 'Performance', subheading: '
()
| 35 | * @doc {heading: 'Performance', subheading: 'Timing'} |
| 36 | */ |
| 37 | function nextFrame(): Promise<void> { |
| 38 | return new Promise<void>(resolve => delayCallback(() => resolve())); |
| 39 | } |
| 40 | |
| 41 | export {nextFrame}; |
no outgoing calls
no test coverage detected
searching dependent graphs…