Skip to content

Commit

Permalink
Fixed createAnimationTimeline type inference causing type incompatibi…
Browse files Browse the repository at this point in the history
…lity errors
  • Loading branch information
lbuljan committed Dec 14, 2023
1 parent da2f1e4 commit d2422d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Luka Buljan <luka@prototyp.digital>",
"Vlatko Vlahek <vlatko@prototyp.digital>"
],
"version": "1.0.10",
"version": "1.0.11",
"license": "MIT",
"types": "lib/typescript/index.d.ts",
"main": "lib/module/index.js",
Expand Down
8 changes: 4 additions & 4 deletions src/utils/animations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ export function animateSequence<Styles extends keyof ViewStyle>(
};
}

interface AnimationTimelineConfiguration<K extends keyof ViewStyle> {
[ms: number]: ElementAnimation<K>[];
interface AnimationTimelineConfiguration {
[ms: number]: ElementAnimation<any>[];
}

export function createAnimationTimeline<K extends keyof ViewStyle>(
timeline: AnimationTimelineConfiguration<K>,
export function createAnimationTimeline(
timeline: AnimationTimelineConfiguration,
) {
const times = Object.keys(timeline).map(ms => Number(ms));

Expand Down

0 comments on commit d2422d1

Please sign in to comment.