Skip to content

Commit 46a6efa

Browse files
committed
add proper Animation types for menu
1 parent fdaf550 commit 46a6efa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/components/menu/menu.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const focusableQueryString =
3333
shadow: true,
3434
})
3535
export class Menu implements ComponentInterface, MenuI {
36-
private animation?: any; // TODO(FW-2832): type
36+
private animation?: Animation;
3737
private lastOnEnd = 0;
3838
private gesture?: Gesture;
3939
private blocker = GESTURE_CONTROLLER.createBlocker({ disableScroll: true });
@@ -477,11 +477,11 @@ export class Menu implements ComponentInterface, MenuI {
477477
this.animation = undefined;
478478
}
479479
// Create new animation
480-
this.animation = await menuController._createAnimation(this.type!, this);
480+
const animation = (this.animation = await menuController._createAnimation(this.type!, this));
481481
if (!config.getBoolean('animated', true)) {
482-
this.animation.duration(0);
482+
animation.duration(0);
483483
}
484-
this.animation.fill('both');
484+
animation.fill('both');
485485
}
486486

487487
private async startAnimation(shouldOpen: boolean, animated: boolean): Promise<void> {

0 commit comments

Comments
 (0)