mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
8d06bddeda
* Update dependency @types/node to v14 * Remove global var Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
16 lines
386 B
TypeScript
16 lines
386 B
TypeScript
(global as any).requestAnimationFrame = (callback: any) => {
|
|
setTimeout(callback, 0);
|
|
};
|
|
|
|
(Promise.prototype as any).finally = function (onFinally: any) {
|
|
return this.then(
|
|
/* onFulfilled */
|
|
(res: any) => Promise.resolve(onFinally()).then(() => res),
|
|
/* onRejected */
|
|
(err: any) =>
|
|
Promise.resolve(onFinally()).then(() => {
|
|
throw err;
|
|
})
|
|
);
|
|
};
|