Skip to content

Commit

Permalink
fix: transform type change in RN 0.71.9 (#4550)
Browse files Browse the repository at this point in the history
This commit
facebook/react-native@2558c3d
added string to `transform` type and it broke Reanimated types.

<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

fixes
[#45](#4548)
  • Loading branch information
radko93 authored Jun 12, 2023
1 parent e631a1b commit fd9bb1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion react-native-reanimated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ declare module 'react-native-reanimated' {

export type TransformStyleTypes = TransformsStyle['transform'] extends
| readonly (infer T)[]
| string
| undefined
? T
: never;
Expand All @@ -78,7 +79,7 @@ declare module 'react-native-reanimated' {

export type AnimateStyle<S> = {
[K in keyof S]: K extends 'transform'
? AnimatedTransform
? AnimatedTransform | string
: S[K] extends ReadonlyArray<any>
? ReadonlyArray<AnimateStyle<S[K][0]>>
: S[K] extends object
Expand Down

0 comments on commit fd9bb1f

Please sign in to comment.