Flow 0.34.0 reports lots of errors
See original GitHub issueDescription
Using Flow 0.34.0 I get a lot of errors in core libraries
Reproduction
$ node_modules/.bin/flow version
Flow, a static type checker for JavaScript, version 0.34.0
$ node_modules/.bin/flow
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `dataReceived` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `loadingFailed` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `loadingFinished` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `requestSent` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/JSInspector/NetworkAgent.js:277
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method `setInterceptor`
277: XMLHttpRequest.setInterceptor(this._interceptor);
^^^^^^^^^^^^^^^^^ Interceptor. Covariant property `responseReceived` incompatible with invariant use in
136: static setInterceptor(interceptor: ?XHRInterceptor) {
^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Network/XMLHttpRequest.js:136
node_modules/react-native/Libraries/ReactNative/YellowBox.js:60
60: console.error = function() {
^^^^^^^ object type. Covariant property `error` incompatible with contravariant use in
60: console.error = function() {
^^^^^^^^^^^^^ assignment of property `error`
node_modules/react-native/Libraries/ReactNative/YellowBox.js:68
68: console.warn = function() {
^^^^^^^ object type. Covariant property `warn` incompatible with contravariant use in
68: console.warn = function() {
^^^^^^^^^^^^ assignment of property `warn`
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:34
34: { diff: AttributeDiffer, process: AttributePreprocessor } |
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:35
35: { diff: AttributeDiffer } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:35
35: { diff: AttributeDiffer } |
^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:36
36: { process: AttributePreprocessor };
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNativeAttributePayload.js:36
36: { process: AttributePreprocessor };
^^^^^^^^^^^^^^^^^^^^^ function type. Callable signature not found in
40: CustomAttributeConfiguration | AttributeConfiguration /*| boolean*/
^^^^^^^^^^^^^^^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js:76
76: previousSibling.sibling = child;
^^^^^^^^^^^^^^^^^^^^^^^ assignment of property `sibling`. Property cannot be assigned on any member of intersection type
76: previousSibling.sibling = child;
^^^^^^^^^^^^^^^ intersection
Member 1:
60: export type Fiber = Instance & {
^^^^^^^^ Instance. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:60
Error:
76: previousSibling.sibling = child;
^^^^^^^ property `sibling`. Property not found in
60: export type Fiber = Instance & {
^^^^^^^^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:60
Member 2:
60: export type Fiber = Instance & {
^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:60
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
44: key: null | string,
^^^^^^^^^^^^^ union: null | string. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Member 1:
44: key: null | string,
^^^^ null. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
44: key: null | string,
^^^^ null. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Member 2:
44: key: null | string,
^^^^^^ string. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
44: key: null | string,
^^^^^^ string. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:44
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
41: tag: TypeOfWork,
^^^^^^^^^^ number enum
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
44: key: null | string,
^^^^^^^^^^^^^ union: null | string
Member 1:
44: key: null | string,
^^^^ null
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
44: key: null | string,
^^^^ null
Member 2:
44: key: null | string,
^^^^^^ string
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
44: key: null | string,
^^^^^^ string
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
60: export type Fiber = Instance & {
^^^^^^^^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
60: export type Fiber = Instance & {
^ object type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
74: ref: null | (handle : ?Object) => void,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ union: null | function type
Member 1:
74: ref: null | (handle : ?Object) => void,
^^^^ null
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
74: ref: null | (handle : ?Object) => void,
^^^^ null
Member 2:
74: ref: null | (handle : ?Object) => void,
^^^^^^^^^^^^^^^^^^^^^^^^^^ function type
Error:
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
74: ref: null | (handle : ?Object) => void,
^^^^^^^^^^^^^^^^^^^^^^^^^^ function type
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
100: pendingWorkPriority: PriorityLevel,
^^^^^^^^^^^^^ number enum
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
105: progressedPriority: PriorityLevel,
^^^^^^^^^^^^^ number enum
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
22: export type UpdateQueue = UpdateQueueNode & {
^^^^^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiberUpdateQueue.js:22
node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js:248
248: function createFiberFromElementType(type : mixed, key : null | string) {
^^^^^ mixed. This type is incompatible with
22: export type UpdateQueue = UpdateQueueNode & {
^ object type. See: node_modules/react-native/Libraries/Renderer/src/renderers/shared/fiber/ReactFiberUpdateQueue.js:22
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:21
21: fontFamily: ReactPropTypes.string,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:22
22: fontSize: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:23
23: fontStyle: ReactPropTypes.oneOf(['normal', 'italic']),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:29
29: fontWeight: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:36
36: fontVariant: ReactPropTypes.arrayOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:45
45: textShadowOffset: ReactPropTypes.shape(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:48
48: textShadowRadius: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:53
53: letterSpacing: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:54
54: lineHeight: ReactPropTypes.number,
^^^^^^^^^^^^^^^^^^^^^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:59
59: textAlign: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:65
65: textAlignVertical: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:68
68: textDecorationLine: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:74
74: textDecorationStyle: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
node_modules/react-native/Libraries/Text/TextStylePropTypes.js:84
84: writingDirection: ReactPropTypes.oneOf(
^ property `isRequired` of object type. Property not found in
18: shape: {[key: string]: ReactPropsCheckType}
^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/react-native/Libraries/StyleSheet/StyleSheetPropType.js:18
Found 39 errors
Solution
- Fix type errors
- Add flow suppress comments
Additional Information
- React Native version: 0.38.0
- Platform: both
- Operating System: macOS
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
Error Suppressions - JavaScript. Flow
Flow reports many different kinds of errors for many common programming mistakes, but not every JavaScript pattern can be understood by Flow.
Read more >Find and fix errors with Flow Checker in Power Automate
View errors or warnings in the checker; Learn to fix errors and warnings; Learn more. Flow Checker in Power Automate promotes higher quality ......
Read more >flow-parser: Versions | Openbase
Full version history for flow-parser including change logs.
Read more >Upgrading Flow Codebases - by Jordan Brown - Medium
After releasing v0.85.0, we've been receiving a lot of feedback from developers ... After the command runs, Flow will report no errors.
Read more >Common Salesforce Flow Errors and How to Troubleshoot Them
The status on the Result record may not have been updated as success or failed after the job execution, hence, the flow step...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Getting a lot of errors with flow ^0.37.4, had to install
flow-binto start with and am getting various errors (see below) that occur prior and post suggested regex fixes:RN 0.39.2
I think the only way to fix this is to upgrade to
0.42. Really sorry about the inconvenience- we are going to be careful with flow errors from here on