-
-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Description
mixColor returnType broken in react-native-reanimated "3.4.2"
const sharedAnimation = useSharedValue(1);
const backgroundColorAnimStyle = useAnimatedStyle(() => {
return {
backgroundColor: mixColor(sharedAnimation.value, '#00001', '#12345'),
};
}, []);
<Animated.View style={backgroundColorAnimStyle} />
Type '{ backgroundColor: AnimatedColor; }' is not assignable to type 'StyleProp<AnimateStyle<MaybeSharedValue<StyleProp<ViewStyle>>>>'.
Type '{ backgroundColor: AnimatedColor; }' is not assignable to type 'AnimateStyle<MaybeSharedValue<ViewStyle>>'.
Types of property 'backgroundColor' are incompatible.
Type 'AnimatedColor' is not assignable to type 'ColorValue | SharedValue<AnimatableValue> | Readonly<SharedValue<string>> | undefined'.
Type 'number' is not assignable to type 'ColorValue | SharedValue<AnimatableValue> | Readonly<SharedValue<string>> | undefined'.ts(2322)
helperTypes.d.ts(32, 5): The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<AnimateProps<ViewProps>, any, any>> & Readonly<...>'
repo to reproducece bug
https://github.com/YOEL311/bugReanimatedRecovery
on redas
branch
https://github.com/YOEL311/bugReanimatedRecovery/tree/redas
arnaud9145, dancixx and zigcccc
Metadata
Metadata
Assignees
Labels
No labels