pre-suppress this typing errors ahead of 154
Summary: This pre-suppresses the 154 error diff ahead of its release, since it is large. Changelog: [Internal] Reviewed By: samwgoldman Differential Revision: D29065246 fbshipit-source-id: f418041305a46df410dcbe3d9a4db81a61ac7014
This commit is contained in:
Родитель
050922a17e
Коммит
974f0a3281
|
@ -262,6 +262,7 @@ class TimersTest extends React.Component<Props, State> {
|
|||
this.clearInterval(this._interval);
|
||||
this._interval = null;
|
||||
}
|
||||
// $FlowFixMe[method-unbinding]
|
||||
this.setState({count: 0}, this._nextTest);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ let _easeInOut;
|
|||
function easeInOut() {
|
||||
if (!_easeInOut) {
|
||||
const Easing = require('../Easing');
|
||||
// $FlowFixMe[method-unbinding]
|
||||
_easeInOut = Easing.inOut(Easing.ease);
|
||||
}
|
||||
return _easeInOut;
|
||||
|
|
|
@ -43,6 +43,7 @@ class BugReporting {
|
|||
if (!BugReporting._subscription) {
|
||||
BugReporting._subscription = RCTDeviceEventEmitter.addListener(
|
||||
'collectBugExtraData',
|
||||
// $FlowFixMe[method-unbinding]
|
||||
BugReporting.collectExtraData,
|
||||
null,
|
||||
);
|
||||
|
@ -52,6 +53,7 @@ class BugReporting {
|
|||
if (!BugReporting._redboxSubscription) {
|
||||
BugReporting._redboxSubscription = RCTDeviceEventEmitter.addListener(
|
||||
'collectRedBoxExtraData',
|
||||
// $FlowFixMe[method-unbinding]
|
||||
BugReporting.collectExtraData,
|
||||
null,
|
||||
);
|
||||
|
|
|
@ -418,6 +418,7 @@ const TouchableMixin = {
|
|||
* @param {SyntheticEvent} e Synthetic event from event system.
|
||||
*
|
||||
*/
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
touchableHandleResponderGrant: function(e: PressEvent) {
|
||||
const dispatchID = e.currentTarget;
|
||||
// Since e is used in a callback invoked on another event loop
|
||||
|
@ -459,6 +460,7 @@ const TouchableMixin = {
|
|||
/**
|
||||
* Place as callback for a DOM element's `onResponderRelease` event.
|
||||
*/
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
touchableHandleResponderRelease: function(e: PressEvent) {
|
||||
this.pressInLocation = null;
|
||||
this._receiveSignal(Signals.RESPONDER_RELEASE, e);
|
||||
|
@ -467,6 +469,7 @@ const TouchableMixin = {
|
|||
/**
|
||||
* Place as callback for a DOM element's `onResponderTerminate` event.
|
||||
*/
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
touchableHandleResponderTerminate: function(e: PressEvent) {
|
||||
this.pressInLocation = null;
|
||||
this._receiveSignal(Signals.RESPONDER_TERMINATED, e);
|
||||
|
@ -475,6 +478,7 @@ const TouchableMixin = {
|
|||
/**
|
||||
* Place as callback for a DOM element's `onResponderMove` event.
|
||||
*/
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
touchableHandleResponderMove: function(e: PressEvent) {
|
||||
// Measurement may not have returned yet.
|
||||
if (!this.state.touchable.positionOnActivate) {
|
||||
|
@ -560,6 +564,7 @@ const TouchableMixin = {
|
|||
* element that was blurred just prior to this. This can be overridden when
|
||||
* using `Touchable.Mixin.withoutDefaultFocusAndBlur`.
|
||||
*/
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
touchableHandleFocus: function(e: Event) {
|
||||
this.props.onFocus && this.props.onFocus(e);
|
||||
},
|
||||
|
@ -572,6 +577,7 @@ const TouchableMixin = {
|
|||
* This can be overridden when using
|
||||
* `Touchable.Mixin.withoutDefaultFocusAndBlur`.
|
||||
*/
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
touchableHandleBlur: function(e: Event) {
|
||||
this.props.onBlur && this.props.onBlur(e);
|
||||
},
|
||||
|
@ -665,6 +671,7 @@ const TouchableMixin = {
|
|||
}
|
||||
},
|
||||
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
_handleQueryLayout: function(
|
||||
l: number,
|
||||
t: number,
|
||||
|
@ -691,11 +698,13 @@ const TouchableMixin = {
|
|||
);
|
||||
},
|
||||
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
_handleDelay: function(e: PressEvent) {
|
||||
this.touchableDelayTimeout = null;
|
||||
this._receiveSignal(Signals.DELAY, e);
|
||||
},
|
||||
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
_handleLongDelay: function(e: PressEvent) {
|
||||
this.longPressDelayTimeout = null;
|
||||
const curState = this.state.touchable.touchState;
|
||||
|
@ -715,6 +724,7 @@ const TouchableMixin = {
|
|||
* @throws Error if invalid state transition or unrecognized signal.
|
||||
* @sideeffects
|
||||
*/
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
_receiveSignal: function(signal: Signal, e: PressEvent) {
|
||||
const responderID = this.state.touchable.responderID;
|
||||
const curState = this.state.touchable.touchState;
|
||||
|
@ -766,6 +776,7 @@ const TouchableMixin = {
|
|||
);
|
||||
},
|
||||
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
_savePressInLocation: function(e: PressEvent) {
|
||||
const touch = extractSingleTouch(e.nativeEvent);
|
||||
const pageX = touch && touch.pageX;
|
||||
|
@ -797,6 +808,7 @@ const TouchableMixin = {
|
|||
* @param {Event} e Native event.
|
||||
* @sideeffects
|
||||
*/
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
_performSideEffectsForTransition: function(
|
||||
curState: State,
|
||||
nextState: State,
|
||||
|
@ -858,11 +870,13 @@ const TouchableMixin = {
|
|||
this.touchableDelayTimeout = null;
|
||||
},
|
||||
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
_startHighlight: function(e: PressEvent) {
|
||||
this._savePressInLocation(e);
|
||||
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);
|
||||
},
|
||||
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
_endHighlight: function(e: PressEvent) {
|
||||
if (this.touchableHandleActivePressOut) {
|
||||
if (
|
||||
|
|
|
@ -188,6 +188,7 @@ class TouchableOpacity extends React.Component<Props, State> {
|
|||
Animated.timing(this.state.anim, {
|
||||
toValue,
|
||||
duration,
|
||||
// $FlowFixMe[method-unbinding]
|
||||
easing: Easing.inOut(Easing.quad),
|
||||
useNativeDriver: true,
|
||||
}).start();
|
||||
|
|
|
@ -33,6 +33,7 @@ const InteractionMixin = {
|
|||
return handle;
|
||||
},
|
||||
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
clearInteractionHandle: function(clearHandle: number): void {
|
||||
InteractionManager.clearInteractionHandle(clearHandle);
|
||||
this._interactionMixinHandles = this._interactionMixinHandles.filter(
|
||||
|
|
|
@ -605,6 +605,7 @@ function ItemWithSeparator(props: ItemWithSeparatorProps): React.Node {
|
|||
|
||||
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
||||
* parameters */
|
||||
// $FlowFixMe[method-unbinding]
|
||||
module.exports = (VirtualizedSectionList: React.AbstractComponent<
|
||||
React.ElementConfig<typeof VirtualizedSectionList>,
|
||||
$ReadOnly<{
|
||||
|
|
|
@ -36,6 +36,7 @@ function LogBoxInspectorSourceMapStatus(props: Props): React.Node {
|
|||
const animation = Animated.loop(
|
||||
Animated.timing(animated, {
|
||||
duration: 2000,
|
||||
// $FlowFixMe[method-unbinding]
|
||||
easing: Easing.linear,
|
||||
toValue: 1,
|
||||
useNativeDriver: true,
|
||||
|
|
|
@ -237,6 +237,7 @@ const AsyncStorage = {
|
|||
*
|
||||
* See https://reactnative.dev/docs/asyncstorage.html#multiget
|
||||
*/
|
||||
// $FlowFixMe[signature-verification-failure]
|
||||
multiGet: function(
|
||||
keys: Array<string>,
|
||||
callback?: ?(errors: ?Array<Error>, result: ?Array<Array<string>>) => void,
|
||||
|
|
|
@ -67,6 +67,7 @@ if (__DEV__) {
|
|||
};
|
||||
}
|
||||
|
||||
// $FlowFixMe[method-unbinding]
|
||||
module.exports = (YellowBox: Class<React.Component<Props>> & {
|
||||
ignoreWarnings($ReadOnlyArray<IgnorePattern>): void,
|
||||
install(): void,
|
||||
|
|
|
@ -421,6 +421,7 @@ module.exports = {
|
|||
})
|
||||
.join('\n');
|
||||
|
||||
// $FlowFixMe[missing-type-arg]
|
||||
const moduleLookups = Object.keys(nativeModules)
|
||||
.filter(hasteModuleName => {
|
||||
const module = nativeModules[hasteModuleName];
|
||||
|
|
|
@ -144,6 +144,7 @@ class StructCollector {
|
|||
resolveAlias: AliasResolver,
|
||||
objectTypeAnnotation: NativeModuleObjectTypeAnnotation,
|
||||
): void {
|
||||
// $FlowFixMe[missing-type-arg]
|
||||
const properties = objectTypeAnnotation.properties.map<
|
||||
$ReadOnly<{
|
||||
name: string,
|
||||
|
|
|
@ -223,6 +223,7 @@ function serializeRegularStruct(
|
|||
.join('\n '),
|
||||
});
|
||||
|
||||
// $FlowFixMe[missing-type-arg]
|
||||
const methods = struct.properties
|
||||
.map<string>(property => {
|
||||
const {typeAnnotation, optional, name: propName} = property;
|
||||
|
|
|
@ -144,6 +144,7 @@ function serializeMethod(
|
|||
/**
|
||||
* Build ObjC Selector
|
||||
*/
|
||||
// $FlowFixMe[missing-type-arg]
|
||||
const selector = methodParams
|
||||
.map<string>(({paramName}) => paramName)
|
||||
.reduce(($selector, paramName, i) => {
|
||||
|
@ -422,6 +423,7 @@ function serializeConstantsProtocolMethods(
|
|||
|
||||
const returnObjCType = `facebook::react::ModuleConstants<JS::${hasteModuleName}::Constants::Builder>`;
|
||||
|
||||
// $FlowFixMe[missing-type-arg]
|
||||
return ['constantsToExport', 'getConstants'].map<MethodSerializationOutput>(
|
||||
methodName => {
|
||||
const protocolMethod = ProtocolMethodTemplate({
|
||||
|
|
|
@ -219,6 +219,7 @@ function translateTypeAnnotation(
|
|||
case 'ObjectTypeAnnotation': {
|
||||
const objectTypeAnnotation = {
|
||||
type: 'ObjectTypeAnnotation',
|
||||
// $FlowFixMe[missing-type-arg]
|
||||
properties: (typeAnnotation.properties: Array<$FlowFixMe>)
|
||||
.map<?NamedShape<Nullable<NativeModuleBaseTypeAnnotation>>>(
|
||||
property => {
|
||||
|
@ -669,6 +670,7 @@ function buildModuleSchema(
|
|||
}
|
||||
});
|
||||
|
||||
// $FlowFixMe[missing-type-arg]
|
||||
return (moduleSpec.body.properties: $ReadOnlyArray<$FlowFixMe>)
|
||||
.filter(property => property.type === 'ObjectTypeProperty')
|
||||
.map<?{
|
||||
|
|
|
@ -64,6 +64,7 @@ class PromptOptions extends React.Component<Props, State> {
|
|||
<TouchableHighlight
|
||||
style={styles.wrapper}
|
||||
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
||||
// $FlowFixMe[incompatible-call]
|
||||
onPress={() => Alert.prompt('Type a value', null, this.saveResponse)}>
|
||||
<View style={styles.button}>
|
||||
<Text>prompt with title & callback</Text>
|
||||
|
@ -104,6 +105,7 @@ class PromptOptions extends React.Component<Props, State> {
|
|||
'Type a value',
|
||||
null,
|
||||
// $FlowFixMe[method-unbinding] added when improving typing for this parameters
|
||||
// $FlowFixMe[incompatible-call]
|
||||
this.saveResponse,
|
||||
undefined,
|
||||
'Default value',
|
||||
|
|
|
@ -30,6 +30,8 @@ export default ({
|
|||
description: ('Sequence, parallel, delay, and ' +
|
||||
'stagger with different easing functions.': string),
|
||||
render: function(): React.Node {
|
||||
// $FlowFixMe[incompatible-use]
|
||||
// $FlowFixMe[incompatible-type]
|
||||
this.anims = this.anims || [1, 2, 3].map(() => new Animated.Value(0));
|
||||
return (
|
||||
<View>
|
||||
|
@ -38,12 +40,15 @@ export default ({
|
|||
const timing = Animated.timing;
|
||||
Animated.sequence([
|
||||
// One after the other
|
||||
// $FlowFixMe[incompatible-use]
|
||||
timing(this.anims[0], {
|
||||
toValue: 200,
|
||||
// $FlowFixMe[method-unbinding]
|
||||
easing: Easing.linear,
|
||||
useNativeDriver: false,
|
||||
}),
|
||||
Animated.delay(400), // Use with sequence
|
||||
// $FlowFixMe[incompatible-use]
|
||||
timing(this.anims[0], {
|
||||
toValue: 0,
|
||||
|
||||
|
@ -55,6 +60,7 @@ export default ({
|
|||
Animated.delay(400),
|
||||
Animated.stagger(
|
||||
200,
|
||||
// $FlowFixMe[incompatible-use]
|
||||
this.anims
|
||||
.map(anim =>
|
||||
timing(anim, {
|
||||
|
@ -63,6 +69,7 @@ export default ({
|
|||
}),
|
||||
)
|
||||
.concat(
|
||||
// $FlowFixMe[incompatible-use]
|
||||
this.anims.map(anim =>
|
||||
timing(anim, {
|
||||
toValue: 0,
|
||||
|
@ -74,12 +81,15 @@ export default ({
|
|||
Animated.delay(400),
|
||||
Animated.parallel(
|
||||
[
|
||||
// $FlowFixMe[method-unbinding]
|
||||
Easing.inOut(Easing.quad), // Symmetric
|
||||
Easing.back(1.5), // Goes backwards first
|
||||
Easing.ease, // Default bezier
|
||||
].map((easing, ii) =>
|
||||
// $FlowFixMe[incompatible-use]
|
||||
timing(this.anims[ii], {
|
||||
toValue: 320,
|
||||
// $FlowFixMe[method-unbinding]
|
||||
easing,
|
||||
duration: 3000,
|
||||
useNativeDriver: false,
|
||||
|
@ -89,11 +99,13 @@ export default ({
|
|||
Animated.delay(400),
|
||||
Animated.stagger(
|
||||
200,
|
||||
// $FlowFixMe[incompatible-use]
|
||||
this.anims.map(anim =>
|
||||
timing(anim, {
|
||||
toValue: 0,
|
||||
|
||||
// Like a ball
|
||||
// $FlowFixMe[method-unbinding]
|
||||
easing: Easing.bounce,
|
||||
|
||||
duration: 2000,
|
||||
|
@ -111,6 +123,7 @@ export default ({
|
|||
style={[
|
||||
styles.content,
|
||||
{
|
||||
// $FlowFixMe[incompatible-use]
|
||||
left: this.anims[ii],
|
||||
},
|
||||
]}>
|
||||
|
|
|
@ -21,11 +21,14 @@ const styles = StyleSheet.create({
|
|||
});
|
||||
|
||||
function RotatingImagesExample(): React.Node {
|
||||
// $FlowFixMe[incompatible-use]
|
||||
// $FlowFixMe[incompatible-type]
|
||||
this.anim = this.anim || new Animated.Value(0);
|
||||
return (
|
||||
<View>
|
||||
<RNTesterButton
|
||||
onPress={() => {
|
||||
// $FlowFixMe[incompatible-use]
|
||||
Animated.spring(this.anim, {
|
||||
// Returns to the start
|
||||
toValue: 0,
|
||||
|
@ -57,12 +60,14 @@ function RotatingImagesExample(): React.Node {
|
|||
}),
|
||||
},
|
||||
{
|
||||
// $FlowFixMe[incompatible-use]
|
||||
translateX: this.anim.interpolate({
|
||||
inputRange: [0, 1],
|
||||
outputRange: [0, 100],
|
||||
}),
|
||||
},
|
||||
{
|
||||
// $FlowFixMe[incompatible-use]
|
||||
rotate: this.anim.interpolate({
|
||||
inputRange: [0, 1],
|
||||
outputRange: [
|
||||
|
|
|
@ -33,11 +33,14 @@ export default ({
|
|||
'an interpolation to convert the value into the ' +
|
||||
'right range and units.': string),
|
||||
render: function(): React.Node {
|
||||
// $FlowFixMe[incompatible-use]
|
||||
// $FlowFixMe[incompatible-type]
|
||||
this.anim = this.anim || new Animated.Value(0);
|
||||
return (
|
||||
<View>
|
||||
<RNTesterButton
|
||||
onPress={() => {
|
||||
// $FlowFixMe[incompatible-use]
|
||||
Animated.spring(this.anim, {
|
||||
// Returns to the start
|
||||
toValue: 0,
|
||||
|
@ -69,12 +72,14 @@ export default ({
|
|||
}),
|
||||
},
|
||||
{
|
||||
// $FlowFixMe[incompatible-use]
|
||||
translateX: this.anim.interpolate({
|
||||
inputRange: [0, 1],
|
||||
outputRange: [0, 500],
|
||||
}),
|
||||
},
|
||||
{
|
||||
// $FlowFixMe[incompatible-use]
|
||||
rotate: this.anim.interpolate({
|
||||
inputRange: [0, 1],
|
||||
outputRange: [
|
||||
|
|
|
@ -31,6 +31,7 @@ class ScrollViewAnimatedExample extends Component<{...}> {
|
|||
Animated.timing(this._scrollViewPos, {
|
||||
toValue: 100,
|
||||
duration: 10000,
|
||||
// $FlowFixMe[method-unbinding]
|
||||
easing: Easing.linear,
|
||||
useNativeDriver: true,
|
||||
}).start();
|
||||
|
|
Загрузка…
Ссылка в новой задаче