From 4a088d5d612ab0387064d388b37d46cdf15cf1ff Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 19 Oct 2023 11:55:25 -0400 Subject: [PATCH] fix(animation): add stronger types to Animation interface (#28334) --- core/src/utils/animation/animation-interface.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/utils/animation/animation-interface.ts b/core/src/utils/animation/animation-interface.ts index b28b9fdd3d2..9c3cc9f9669 100644 --- a/core/src/utils/animation/animation-interface.ts +++ b/core/src/utils/animation/animation-interface.ts @@ -35,9 +35,9 @@ export interface Animation { progressStep(step: number): Animation; progressEnd(playTo: 0 | 1 | undefined, step: number, dur?: number): Animation; - from(property: string, value: any): Animation; - to(property: string, value: any): Animation; - fromTo(property: string, fromValue: any, toValue: any): Animation; + from(property: string, value: string | number): Animation; + to(property: string, value: string | number): Animation; + fromTo(property: string, fromValue: string | number, toValue: string | number): Animation; /** * Set the keyframes for the animation. @@ -131,7 +131,7 @@ export interface Animation { * browsers that do not support * the Web Animations API. */ - getWebAnimations(): any[]; + getWebAnimations(): globalThis.Animation[]; // Use the Web Animation interface, not the Ionic Animations interface /** * Add a function that performs a