diff --git a/angular/src/util/overlay.ts b/angular/src/util/overlay.ts index 25d95d566b..4ba45e61a9 100644 --- a/angular/src/util/overlay.ts +++ b/angular/src/util/overlay.ts @@ -7,7 +7,7 @@ export class OverlayBaseController { return proxyMethod(this.ctrl, 'create', opts); } - dismiss(data?: any, role?: string, id = -1): Promise { + dismiss(data?: any, role?: string, id?: number): Promise { return proxyMethod(this.ctrl, 'dismiss', data, role, id); } diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 380edbe505..90e34dbfe9 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -6,7 +6,7 @@ import '@stencil/core'; -import 'ionicons' +import 'ionicons'; import { ActionSheetButton, ActionSheetOptions, @@ -79,7 +79,7 @@ export namespace Components { /** * Get the most recently opened action sheet overlay. */ - 'getTop': () => Promise; + 'getTop': () => Promise; } interface IonActionSheetControllerAttributes extends StencilHTMLAttributes {} @@ -228,7 +228,7 @@ export namespace Components { /** * Get the most recently opened alert overlay. */ - 'getTop': () => Promise; + 'getTop': () => Promise; } interface IonAlertControllerAttributes extends StencilHTMLAttributes {} @@ -2219,7 +2219,7 @@ export namespace Components { /** * Get the most recently opened loading overlay. */ - 'getTop': () => Promise; + 'getTop': () => Promise; } interface IonLoadingControllerAttributes extends StencilHTMLAttributes {} @@ -2561,7 +2561,7 @@ export namespace Components { /** * Get the most recently opened modal overlay. */ - 'getTop': () => Promise; + 'getTop': () => Promise; } interface IonModalControllerAttributes extends StencilHTMLAttributes {} @@ -2861,7 +2861,7 @@ export namespace Components { interface IonPickerController { 'create': (opts: PickerOptions) => Promise; 'dismiss': (data?: any, role?: string | undefined, pickerId?: number | undefined) => Promise; - 'getTop': () => Promise; + 'getTop': () => Promise; } interface IonPickerControllerAttributes extends StencilHTMLAttributes {} @@ -3008,7 +3008,7 @@ export namespace Components { /** * Get the most recently opened popover overlay. */ - 'getTop': () => Promise; + 'getTop': () => Promise; } interface IonPopoverControllerAttributes extends StencilHTMLAttributes {} @@ -4828,7 +4828,7 @@ export namespace Components { /** * Get the most recently opened toast overlay. */ - 'getTop': () => Promise; + 'getTop': () => Promise; } interface IonToastControllerAttributes extends StencilHTMLAttributes {} diff --git a/core/src/components/action-sheet-controller/action-sheet-controller.tsx b/core/src/components/action-sheet-controller/action-sheet-controller.tsx index 84432fd798..70494fe6ad 100644 --- a/core/src/components/action-sheet-controller/action-sheet-controller.tsx +++ b/core/src/components/action-sheet-controller/action-sheet-controller.tsx @@ -30,7 +30,7 @@ export class ActionSheetController implements OverlayController { * Get the most recently opened action sheet overlay. */ @Method() - async getTop(): Promise { + async getTop(): Promise { return getOverlay(this.doc, 'ion-action-sheet') as HTMLIonActionSheetElement; } } diff --git a/core/src/components/alert-controller/alert-controller.tsx b/core/src/components/alert-controller/alert-controller.tsx index 8a7bce8d5c..95ab6be47b 100644 --- a/core/src/components/alert-controller/alert-controller.tsx +++ b/core/src/components/alert-controller/alert-controller.tsx @@ -30,7 +30,7 @@ export class AlertController implements OverlayController { * Get the most recently opened alert overlay. */ @Method() - async getTop(): Promise { + async getTop(): Promise { return getOverlay(this.doc, 'ion-alert') as HTMLIonAlertElement; } } diff --git a/core/src/components/loading-controller/loading-controller.tsx b/core/src/components/loading-controller/loading-controller.tsx index 0316c6b4df..a3218b8a1d 100644 --- a/core/src/components/loading-controller/loading-controller.tsx +++ b/core/src/components/loading-controller/loading-controller.tsx @@ -30,7 +30,7 @@ export class LoadingController implements OverlayController { * Get the most recently opened loading overlay. */ @Method() - async getTop(): Promise { + async getTop(): Promise { return getOverlay(this.doc, 'ion-loading') as HTMLIonLoadingElement; } } diff --git a/core/src/components/modal-controller/modal-controller.tsx b/core/src/components/modal-controller/modal-controller.tsx index 955d304308..ab349758d3 100644 --- a/core/src/components/modal-controller/modal-controller.tsx +++ b/core/src/components/modal-controller/modal-controller.tsx @@ -30,7 +30,7 @@ export class ModalController implements OverlayController { * Get the most recently opened modal overlay. */ @Method() - async getTop(): Promise { + async getTop(): Promise { return getOverlay(this.doc, 'ion-modal') as HTMLIonModalElement; } } diff --git a/core/src/components/picker-controller/picker-controller.tsx b/core/src/components/picker-controller/picker-controller.tsx index c5a3b4569b..1ab55686fb 100644 --- a/core/src/components/picker-controller/picker-controller.tsx +++ b/core/src/components/picker-controller/picker-controller.tsx @@ -31,7 +31,7 @@ export class PickerController implements OverlayController { * Get the most recently opened picker overlay. */ @Method() - async getTop(): Promise { + async getTop(): Promise { return getOverlay(this.doc, 'ion-picker') as HTMLIonPickerElement; } } diff --git a/core/src/components/popover-controller/popover-controller.tsx b/core/src/components/popover-controller/popover-controller.tsx index 1aec85aec4..126e6c3604 100644 --- a/core/src/components/popover-controller/popover-controller.tsx +++ b/core/src/components/popover-controller/popover-controller.tsx @@ -30,7 +30,7 @@ export class PopoverController implements OverlayController { * Get the most recently opened popover overlay. */ @Method() - async getTop(): Promise { + async getTop(): Promise { return getOverlay(this.doc, 'ion-popover') as HTMLIonPopoverElement; } } diff --git a/core/src/components/toast-controller/toast-controller.tsx b/core/src/components/toast-controller/toast-controller.tsx index 47c94db406..530c4e4fa7 100644 --- a/core/src/components/toast-controller/toast-controller.tsx +++ b/core/src/components/toast-controller/toast-controller.tsx @@ -30,7 +30,7 @@ export class ToastController implements OverlayController { * Get the most recently opened toast overlay. */ @Method() - async getTop(): Promise { + async getTop(): Promise { return getOverlay(this.doc, 'ion-toast') as HTMLIonToastElement; } } diff --git a/core/src/utils/overlays-interface.ts b/core/src/utils/overlays-interface.ts index 5491a50159..5cf1c0acb0 100644 --- a/core/src/utils/overlays-interface.ts +++ b/core/src/utils/overlays-interface.ts @@ -33,7 +33,7 @@ export interface OverlayInterface { export interface OverlayController { create(opts?: any): Promise; dismiss(data?: any, role?: string, alertId?: number): Promise; - getTop(): Promise; + getTop(): Promise; } export interface HTMLIonOverlayElement extends HTMLStencilElement {