grafana/public/app/angular/promiseToDigest.ts

4 lines
149 B
TypeScript
Raw Normal View History

import { IScope } from 'angular';
export const promiseToDigest = ($scope: IScope) => (promise: Promise<any>) => promise.finally($scope.$evalAsync);