diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 18b0009930..cc1c715a68 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -23,6 +23,7 @@ import { FrameworkDelegate, HeaderFn, InputChangeEventDetail, + IonicAnimation, ItemHeightFn, ItemRenderFn, ItemReorderEventDetail, @@ -1387,7 +1388,7 @@ export namespace Components { /** * Registers a new animation that can be used with any `ion-menu` by passing the name of the animation in its `type` property. */ - 'registerAnimation': (name: string, animation: any) => Promise; + 'registerAnimation': (name: string, animation: IonicAnimation | AnimationBuilder) => Promise; /** * Enable or disable the ability to swipe open the menu. */ diff --git a/core/src/components/menu-controller/menu-controller.ts b/core/src/components/menu-controller/menu-controller.ts index f80633a7a5..9358972b79 100644 --- a/core/src/components/menu-controller/menu-controller.ts +++ b/core/src/components/menu-controller/menu-controller.ts @@ -1,7 +1,7 @@ import { Build, Component, Method } from '@stencil/core'; import { config } from '../../global/config'; -import { AnimationBuilder, MenuControllerI, MenuI } from '../../interface'; +import { AnimationBuilder, IonicAnimation, MenuControllerI, MenuI } from '../../interface'; import { menuOverlayAnimation } from './animations/overlay'; import { menuPushAnimation } from './animations/push'; @@ -14,7 +14,7 @@ import { menuRevealAnimation } from './animations/reveal'; export class MenuController implements MenuControllerI { private menus: MenuI[] = []; - private menuAnimations = new Map(); + private menuAnimations = new Map(); constructor() { this.registerAnimation('reveal', menuRevealAnimation); @@ -226,7 +226,7 @@ export class MenuController implements MenuControllerI { * @param animation The animation function to register. */ @Method() - async registerAnimation(name: string, animation: any) { + async registerAnimation(name: string, animation: IonicAnimation | AnimationBuilder) { this.menuAnimations.set(name, animation); }