fix(animation): add stronger types to Animation interface (#28334)

This commit is contained in:
Liam DeBeasi
2023-10-19 11:55:25 -04:00
committed by GitHub
parent 51c8dc82e9
commit 4a088d5d61

View File

@@ -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