Skip to content

Commit

Permalink
fix(animation): add stronger types to Animation interface (#28334)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamdebeasi authored Oct 19, 2023
1 parent 51c8dc8 commit 4a088d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/utils/animation/animation-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4a088d5

Please sign in to comment.