UNPKG

309 BPlain TextView Raw
1'use strict';
2
3// This is Jest implementation of `requestAnimationFrame` that is required
4// by React Native for test purposes.
5export function mockedRequestAnimationFrame(
6 callback: (timestamp: number) => void
7): ReturnType<typeof setTimeout> {
8 return setTimeout(() => callback(performance.now()), 0);
9}