mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add missing class annotations xplat/js
Reviewed By: SamChou19815 Differential Revision: D38373443 fbshipit-source-id: 1222c4845ebd6b72bd6f54af1a27cf8542dd883a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2fa04be062
commit
ee3d3c248d
@@ -140,7 +140,7 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
|
||||
// components. If you want to animate a composite component, you need to
|
||||
// re-render it. In this case, we have a fallback that uses forceUpdate.
|
||||
// This fallback is also called in Fabric.
|
||||
_animatedPropsCallback = () => {
|
||||
_animatedPropsCallback = (): void => {
|
||||
if (this._component == null) {
|
||||
// AnimatedProps is created in will-mount because it's used in render.
|
||||
// But this callback may be invoked before mount in async mode,
|
||||
@@ -192,7 +192,7 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
|
||||
}
|
||||
}
|
||||
|
||||
_setComponentRef = setAndForwardRef({
|
||||
_setComponentRef: (ref: React.ElementRef<any>) => void = setAndForwardRef({
|
||||
getForwardedRef: () => this.props.forwardedRef,
|
||||
setLocalRef: ref => {
|
||||
this._prevComponent = this._component;
|
||||
@@ -200,7 +200,7 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
|
||||
},
|
||||
});
|
||||
|
||||
render() {
|
||||
render(): React.Node {
|
||||
const animatedProps =
|
||||
this._propsAnimated.__getValue(this._initialAnimatedProps) || {};
|
||||
const {style = {}, ...props} = animatedProps;
|
||||
|
||||
Reference in New Issue
Block a user