Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork149
Open
Labels
Description
I am currently having an optional interpolation depending on an optional animated value
~transform=[|Transform.translateY( ~translateY=Animated.( animatedFloat( scrollYAnimatedValue->Option.map(scrollYAnimatedValue=>Animated.Value.add( state.animation,Value.interpolate( scrollYAnimatedValue,Interpolation.( config( ~inputRange=[|(-200.),1.|], ~outputRange= fromFloatArray([|(-200.),1.|]),(), ) ), ), ) )->Option.getWithDefault(state.animation), ) ), ),|],
This code should work but doesn't compile, complaining that->Option.getWithDefault(state.animation) isn't the same type as the interpolation.
Error: This expression has type ReactNative.Animated.value(ReactNative.Animated.regular) = ReactNative.Animated.value(ReactNative.Animated.regular) but an expression was expected of type ReactNative.Animated.value(ReactNative.Animated.calculated) = ReactNative.Animated.value(ReactNative.Animated.calculated) Type ReactNative.Animated.regular = ReactNative.Animated.regular is not compatible with type ReactNative.Animated.calculated = ReactNative.Animated.calculatedWe should have something to tell that a regular & calculated are the same at the end, don't we?