-2

Expected 3-4 arguments, but got 2.ts(2554) react-native-reanimated.d.ts(383, 7): An argument for 'output' was not provided.

const translateX = Animated.interpolate(props.progress, {
inputRange: [0, 0.5, 0.7, 0.8, 1],
outputRange: [-100, -85, -70, -45, 0],

});re

  • please provide more information like the version of the library. Have you followed the documentation and the examples there? – m_wer Oct 20 '21 at 13:06

1 Answers1

0

This is happening because you're using the interpolate definition from reanimated 1 whereas typescript is recognizing the interpolate definition of reanimated 2. Change interpolate to interpolateNode.

Refer to the following link:
https://docs.swmansion.com/react-native-reanimated/docs/2.3.0-alpha.2/migration/#1-interpolate-renamed-to-interpolatenode

Sameer
  • 1