Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit types for methods from AnimatedImplementation in AnimatedMock #48610

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-native/Libraries/Animated/AnimatedMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,4 @@ export default {
forkEvent: AnimatedImplementation.forkEvent,
unforkEvent: AnimatedImplementation.unforkEvent,
Event: AnimatedEvent,
};
} as typeof AnimatedImplementation;
Original file line number Diff line number Diff line change
Expand Up @@ -269,68 +269,8 @@ exports[`public API should not change unintentionally Libraries/Animated/Animate
_isUsingNativeDriver: () => boolean,
...
};
declare const spring: (
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
config: SpringAnimationConfig
) => CompositeAnimation;
declare const timing: (
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
config: TimingAnimationConfig
) => CompositeAnimation;
declare const decay: (
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
config: DecayAnimationConfig
) => CompositeAnimation;
declare const sequence: (
animations: Array<CompositeAnimation>
) => CompositeAnimation;
type ParallelConfig = { stopTogether?: boolean, ... };
declare const parallel: (
animations: Array<CompositeAnimation>,
config?: ?ParallelConfig
) => CompositeAnimation;
declare const delay: (time: number) => CompositeAnimation;
declare const stagger: (
time: number,
animations: Array<CompositeAnimation>
) => CompositeAnimation;
type LoopAnimationConfig = {
iterations: number,
resetBeforeIteration?: boolean,
...
};
declare const loop: (
animation: CompositeAnimation,
LoopAnimationConfig
) => CompositeAnimation;
export type { AnimatedNumeric as Numeric };
declare export default {
Value: AnimatedValue,
ValueXY: AnimatedValueXY,
Color: AnimatedColor,
Interpolation: AnimatedInterpolation,
Node: AnimatedNode,
decay: decay,
timing: timing,
spring: spring,
add: $FlowFixMe,
subtract: $FlowFixMe,
divide: $FlowFixMe,
multiply: $FlowFixMe,
modulo: $FlowFixMe,
diffClamp: $FlowFixMe,
delay: delay,
sequence: sequence,
parallel: parallel,
stagger: stagger,
loop: loop,
event: $FlowFixMe,
createAnimatedComponent: createAnimatedComponent,
attachNativeEvent: attachNativeEvent,
forkEvent: $FlowFixMe,
unforkEvent: $FlowFixMe,
Event: AnimatedEvent,
};
declare export default typeof AnimatedImplementation;
"
`;

Expand Down
Loading