Skip to content

Commit

Permalink
AnimatedRotateComponent [nfc]: Add simple type annotation.
Browse files Browse the repository at this point in the history
With the new Flow version (0.122.0) coming along with the React
Native v0.63 upgrade (zulip#4245), this would be flagged with a "Could
not decide which case to select" error.

I'm not sure why it has trouble distinguishing this array of strings
from a possible array of numbers, but it's simple enough to just
annotate it as an array of strings, so, might as well.
  • Loading branch information
chrisbobbe committed Jan 14, 2021
1 parent 63c579e commit a0d1e95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/animation/AnimatedRotateComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class AnimatedRotateComponent extends PureComponent<Props> {
const { children, style } = this.props;
const rotation = this.rotation.interpolate({
inputRange: [0, 360],
outputRange: ['0deg', '360deg'],
outputRange: (['0deg', '360deg']: string[]),
});
const animatedStyle = { transform: [{ rotate: rotation }] };

Expand Down

0 comments on commit a0d1e95

Please sign in to comment.