mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(animation): add stronger types to Animation interface (#28334)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user