diff --git a/core/api.txt b/core/api.txt index 222f6da89f..d875b9baba 100644 --- a/core/api.txt +++ b/core/api.txt @@ -663,7 +663,7 @@ ion-menu-controller,method,isAnimating,isAnimating() => Promise ion-menu-controller,method,isEnabled,isEnabled(menu?: string | null | undefined) => Promise ion-menu-controller,method,isOpen,isOpen(menu?: string | null | undefined) => Promise ion-menu-controller,method,open,open(menu?: string | null | undefined) => Promise -ion-menu-controller,method,registerAnimation,registerAnimation(name: string, animation: ((menu: MenuI) => IonicAnimation) | AnimationBuilder) => Promise +ion-menu-controller,method,registerAnimation,registerAnimation(name: string, animation: AnimationBuilder | ((menu: MenuI) => IonicAnimation)) => Promise ion-menu-controller,method,swipeGesture,swipeGesture(enable: boolean, menu?: string | null | undefined) => Promise ion-menu-controller,method,toggle,toggle(menu?: string | null | undefined) => Promise diff --git a/core/src/components/menu-controller/menu-controller.ts b/core/src/components/menu-controller/menu-controller.ts index 64235fa624..21b53c0851 100644 --- a/core/src/components/menu-controller/menu-controller.ts +++ b/core/src/components/menu-controller/menu-controller.ts @@ -226,7 +226,7 @@ export class MenuController implements MenuControllerI { * @param animation The animation function to register. */ @Method() - async registerAnimation(name: string, animation: ((menu: MenuI) => IonicAnimation) | AnimationBuilder) { + async registerAnimation(name: string, animation: AnimationBuilder | ((menu: MenuI) => IonicAnimation)) { this.menuAnimations.set(name, animation); } diff --git a/core/src/components/menu-controller/readme.md b/core/src/components/menu-controller/readme.md index 7887a43e01..f51a9fe48a 100644 --- a/core/src/components/menu-controller/readme.md +++ b/core/src/components/menu-controller/readme.md @@ -116,7 +116,7 @@ Type: `Promise` -### `registerAnimation(name: string, animation: ((menu: MenuI) => IonicAnimation) | AnimationBuilder) => Promise` +### `registerAnimation(name: string, animation: AnimationBuilder | ((menu: MenuI) => IonicAnimation)) => Promise` Registers a new animation that can be used with any `ion-menu` by passing the name of the animation in its `type` property.