Make Animated.Interpolation config read-only

Summary:
Changelog:
[General] [Changed] Type the argument of Animated.interpolate as read-only

Reviewed By: javache

Differential Revision: D33950698

fbshipit-source-id: b959d34eb9752358f4a8ba1d290b56c099f535e0
This commit is contained in:
Moti Zilberman 2022-02-03 03:43:37 -08:00 коммит произвёл Facebook GitHub Bot
Родитель 1f778014a7
Коммит 6584304c10
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -23,14 +23,14 @@ import type {PlatformConfig} from '../AnimatedPlatformConfig';
type ExtrapolateType = 'extend' | 'identity' | 'clamp';
export type InterpolationConfigType = {
export type InterpolationConfigType = $ReadOnly<{
inputRange: $ReadOnlyArray<number>,
outputRange: $ReadOnlyArray<number> | $ReadOnlyArray<string>,
easing?: (input: number) => number,
extrapolate?: ExtrapolateType,
extrapolateLeft?: ExtrapolateType,
extrapolateRight?: ExtrapolateType,
};
}>;
const linear = (t: number) => t;