mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
refactor(alert): update various interfaces and exports, fix alert dismiss promise flow to work correctly
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Animation, StencilElement } from '../index';
|
||||
import { Animation, DomController, StencilElement } from '../index';
|
||||
|
||||
export function clamp(min: number, n: number, max: number) {
|
||||
return Math.max(min, Math.min(n, max));
|
||||
@ -279,3 +279,12 @@ export function playAnimationAsync(animation: Animation): Promise<Animation> {
|
||||
animation.play();
|
||||
});
|
||||
}
|
||||
|
||||
export function domControllerAsync(domControllerFunction: Function, callback: Function) {
|
||||
return new Promise((resolve) => {
|
||||
domControllerFunction(() => {
|
||||
callback();
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user