forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
386 B
15 lines
386 B
(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;
|
|
})
|
|
);
|
|
};
|
|
|