Skip to content

Commit

Permalink
Make Animated.Interpolation config read-only
Browse files Browse the repository at this point in the history
Summary:
Changelog:
[General] [Changed] Type the argument of Animated.interpolate as read-only

Reviewed By: javache

Differential Revision: D33950698

fbshipit-source-id: b959d34eb9752358f4a8ba1d290b56c099f535e0
  • Loading branch information
motiz88 authored and facebook-github-bot committed Feb 3, 2022
1 parent 1f77801 commit 6584304
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/Animated/nodes/AnimatedInterpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6584304

Please sign in to comment.