mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
18 lines
447 B
TypeScript
18 lines
447 B
TypeScript
import { proxyMethod } from '../util/util';
|
|
|
|
export class OverlayBaseController<Opts, Overlay> {
|
|
constructor(private ctrl: string) {}
|
|
|
|
create(opts?: Opts): Promise<Overlay> {
|
|
return proxyMethod(this.ctrl, 'create', opts);
|
|
}
|
|
|
|
dismiss(data?: any, role?: string, id = -1): Promise<void> {
|
|
return proxyMethod(this.ctrl, 'dismiss', data, role, id);
|
|
}
|
|
|
|
getTop(): Promise<Overlay> {
|
|
return proxyMethod(this.ctrl, 'getTop');
|
|
}
|
|
}
|