UNPKG

typeit

Version:

The most versatile animated typing utility on the planet.

10 lines (8 loc) 191 B
let beforePaint = (cb): Promise<any> => { return new Promise((resolve) => { requestAnimationFrame(async () => { resolve(await cb()); }); }); }; export default beforePaint;