diff --git a/lib/react.js b/lib/react.js index 17585e3d43a..ee99eb43b65 100644 --- a/lib/react.js +++ b/lib/react.js @@ -323,8 +323,8 @@ declare module react { inputs: ?$ReadOnlyArray, ): void; - declare export function useCallback( - callback: () => T | void, + declare export function useCallback) => mixed>( + callback: T, inputs: ?$ReadOnlyArray, ): T; diff --git a/tests/getters_and_setters/getters_and_setters.exp b/tests/getters_and_setters/getters_and_setters.exp index 455166debdb..ad7c57bbb13 100644 --- a/tests/getters_and_setters/getters_and_setters.exp +++ b/tests/getters_and_setters/getters_and_setters.exp @@ -465,13 +465,8 @@ References: react.js:17:13 17| (); // error: number ~> string ^^^^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] @@ -487,13 +482,8 @@ References: react.js:18:20 18| (); // error: number ~> string ^ [1] -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [2] diff --git a/tests/new_react/new_react.exp b/tests/new_react/new_react.exp index e3a90c4731a..f36e2f37ab5 100644 --- a/tests/new_react/new_react.exp +++ b/tests/new_react/new_react.exp @@ -189,13 +189,8 @@ Cannot assign `this.props.x` to `_` because number [1] is incompatible with stri ^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [1] classes.js:57:12 57| var _: string = this.props.x; @@ -393,13 +388,8 @@ Cannot assign `this.props.z` to `qux` because: ^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [1] new_react.js:19:18 19| var qux: string = this.props.z; @@ -415,13 +405,8 @@ Cannot assign `this.props.x` to `w` because string [1] is incompatible with numb ^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] new_react.js:20:15 20| var w:number = this.props.x; @@ -454,13 +439,8 @@ References: new_react.js:29:23 29| var element = ; ^ [1] -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [2] @@ -565,13 +545,8 @@ Cannot assign `this.props.x` to `a` because: ^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] props.js:14:16 14| var a: number = this.props.x; // error @@ -607,13 +582,8 @@ Cannot assign `this.props.z` to `c` because: ^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [1] props.js:16:16 16| var c: string = this.props.z; // error @@ -634,24 +604,14 @@ References: props.js:20:29 20| var element = ; // 3 errors ^^^^^ [1] -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [2] props.js:20:49 20| var element = ; // 3 errors ^^^^^ [3] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [4] @@ -708,13 +668,8 @@ References: props2.js:9:41 9| getInitialState: function(): { bar: number } { ^^^^^^ [1] -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [2] props2.js:15:42 15| return ; @@ -745,21 +700,12 @@ Cannot get `React.PropTypes.string.inRequired` because property `inRequired` is ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:380:39 + /react.js:387:39 v - 380| type ReactPropsChainableTypeChecker = { - 381| isRequired: ReactPropsCheckType; - 382| (props: any, propName: string, componentName: string, href?: string): ?Error; - 383| }; -======= - /react.js:379:39 - v - 379| type ReactPropsChainableTypeChecker = { - 380| isRequired: ReactPropsCheckType; - 381| (props: any, propName: string, componentName: string, href?: string): ?Error; - 382| }; ->>>>>>> Add React.Suspense component and tests + 387| type ReactPropsChainableTypeChecker = { + 388| isRequired: ReactPropsCheckType; + 389| (props: any, propName: string, componentName: string, href?: string): ?Error; + 390| }; ^ [1] diff --git a/tests/react/react.exp b/tests/react/react.exp index ee3f1b4b9f3..c1c56b65db8 100644 --- a/tests/react/react.exp +++ b/tests/react/react.exp @@ -80,13 +80,8 @@ Cannot cast `this.props.foo` to empty because string [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:7:22 7| (this.props.foo: empty); // error: string ~> empty @@ -102,13 +97,8 @@ Cannot cast `this.props.bar` to empty because number [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [1] create_class.js:8:22 8| (this.props.bar: empty); // error: number ~> empty @@ -261,13 +251,8 @@ Cannot cast `this.props.foo` to empty because string [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:117:22 117| (this.props.foo: empty); // string ~> empty @@ -283,13 +268,8 @@ Cannot cast `this.state.foo` to empty because string [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:118:22 118| (this.state.foo: empty); // string ~> empty @@ -305,13 +285,8 @@ Cannot cast `this.props.foo` to empty because string [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:133:22 133| (this.props.foo: empty); // string ~> empty @@ -327,13 +302,8 @@ Cannot cast `this.props.foo` to empty because string [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:137:22 137| (this.props.foo: empty); // string ~> empty @@ -349,13 +319,8 @@ Cannot cast `this.props.foo` to empty because string [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:141:22 141| (this.props.foo: empty); // string ~> empty @@ -371,13 +336,8 @@ Cannot cast `nextProps.foo` to empty because string [1] is incompatible with emp ^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:142:21 142| (nextProps.foo: empty); // string ~> empty @@ -393,13 +353,8 @@ Cannot cast `this.props.foo` to empty because string [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:146:22 146| (this.props.foo: empty); // string ~> empty @@ -432,13 +387,8 @@ Cannot cast `nextProps.foo` to empty because string [1] is incompatible with emp ^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:148:21 148| (nextProps.foo: empty); // string ~> empty @@ -485,13 +435,8 @@ Cannot cast `this.props.foo` to empty because string [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:153:22 153| (this.props.foo: empty); // string ~> empty @@ -524,13 +469,8 @@ Cannot cast `nextProps.foo` to empty because string [1] is incompatible with emp ^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:155:21 155| (nextProps.foo: empty); // string ~> empty @@ -563,13 +503,8 @@ Cannot cast `this.props.foo` to empty because string [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:160:22 160| (this.props.foo: empty); // string ~> empty @@ -602,13 +537,8 @@ Cannot cast `nextProps.foo` to empty because string [1] is incompatible with emp ^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:162:21 162| (nextProps.foo: empty); // string ~> empty @@ -641,13 +571,8 @@ Cannot cast `this.props.foo` to empty because string [1] is incompatible with em ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [1] create_class.js:167:22 167| (this.props.foo: empty); // string ~> empty @@ -1979,13 +1904,8 @@ References: jsx_spread.js:10:19 10| var props = {bar: 42}; ^^ [1] -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [2] @@ -2098,13 +2018,8 @@ References: proptype_arrayOf.js:15:45 15| var fail_mistyped_elems = ^^^^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] @@ -2120,13 +2035,8 @@ References: proptype_arrayOf.js:20:36 20| var todo_required = ^^^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] @@ -2143,13 +2053,8 @@ References: proptype_arrayOf.js:30:25 30| (); // error: string ~> number ^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] @@ -2187,13 +2092,8 @@ Cannot cast `propName` to empty because string [1] is incompatible with empty [2 ^^^^^^^^ References: -<<<<<<< HEAD - /react.js:376:13 - 376| propName: string, -======= - /react.js:375:13 - 375| propName: string, ->>>>>>> Add React.Suspense component and tests + /react.js:383:13 + 383| propName: string, ^^^^^^ [1] proptype_custom_validator.js:8:18 8| (propName: empty); // error: propName is a string @@ -2209,13 +2109,8 @@ Cannot cast `componentName` to empty because string [1] is incompatible with emp ^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:377:18 - 377| componentName: string, -======= - /react.js:376:18 - 376| componentName: string, ->>>>>>> Add React.Suspense component and tests + /react.js:384:18 + 384| componentName: string, ^^^^^^ [1] proptype_custom_validator.js:9:23 9| (componentName: empty); // error: componentName is a string @@ -2233,13 +2128,8 @@ Cannot cast `href` to empty because: ^^^^ References: -<<<<<<< HEAD - /react.js:378:10 - 378| href?: string) => ?Error; -======= - /react.js:377:10 - 377| href?: string) => ?Error; ->>>>>>> Add React.Suspense component and tests + /react.js:385:10 + 385| href?: string) => ?Error; ^^^^^^ [1] proptype_custom_validator.js:10:14 10| (href: empty); // error: href is an optional string @@ -2258,13 +2148,8 @@ References: proptype_custom_validator.js:11:18 11| return (0: mixed); // error: should return ?Error ^^^^^ [1] -<<<<<<< HEAD - /react.js:378:22 - 378| href?: string) => ?Error; -======= - /react.js:377:22 - 377| href?: string) => ?Error; ->>>>>>> Add React.Suspense component and tests + /react.js:385:22 + 385| href?: string) => ?Error; ^^^^^ [2] @@ -2357,13 +2242,8 @@ References: proptype_objectOf.js:15:47 15| var fail_mistyped_props = ^^^^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] @@ -2379,13 +2259,8 @@ References: proptype_objectOf.js:20:38 20| var todo_required = ^^^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] @@ -2401,13 +2276,8 @@ References: proptype_objectOf.js:30:27 30| (); // error: string ~> number ^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] @@ -2582,19 +2452,11 @@ References: proptype_oneOfType.js:24:32 24| var fail_bool = ; ^^^^ [1] -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [2] - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; - ^^^^^^ [2] - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [3] @@ -2612,19 +2474,11 @@ References: proptype_oneOfType.js:29:36 29| var todo_required = ; ^^^^ [1] -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; - ^^^^^^ [2] - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [2] - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [3] @@ -2640,13 +2494,8 @@ References: proptype_oneOfType.js:41:22 41| (); // error: number ~> string ^ [1] -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [2] @@ -2728,24 +2577,14 @@ Cannot cast `React.PropTypes.arrayOf` to `NoFun` because: ^^^^^^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:386:17 - 386| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; -======= - /react.js:385:17 - 385| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; ->>>>>>> Add React.Suspense component and tests + /react.js:393:17 + 393| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; ^^^^^^^^^^^^^^^^^^^ [1] proptypes_builtins.js:3:14 3| type NoFun = mixed => empty; ^^^^^ [2] -<<<<<<< HEAD - /react.js:386:41 - 386| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; -======= - /react.js:385:41 - 385| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; ->>>>>>> Add React.Suspense component and tests + /react.js:393:41 + 393| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] proptypes_builtins.js:3:23 3| type NoFun = mixed => empty; @@ -2762,13 +2601,8 @@ empty [2] in the return value. ^^^^^^^^^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:388:27 - 388| (expectedClass: any) => ReactPropsChainableTypeChecker; -======= - /react.js:387:27 - 387| (expectedClass: any) => ReactPropsChainableTypeChecker; ->>>>>>> Add React.Suspense component and tests + /react.js:395:27 + 395| (expectedClass: any) => ReactPropsChainableTypeChecker; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] proptypes_builtins.js:3:23 3| type NoFun = mixed => empty; @@ -2786,24 +2620,14 @@ Cannot cast `React.PropTypes.objectOf` to `NoFun` because: ^^^^^^^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:390:17 - 390| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; -======= - /react.js:389:17 - 389| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; ->>>>>>> Add React.Suspense component and tests + /react.js:397:17 + 397| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; ^^^^^^^^^^^^^^^^^^^ [1] proptypes_builtins.js:3:14 3| type NoFun = mixed => empty; ^^^^^ [2] -<<<<<<< HEAD - /react.js:390:41 - 390| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; -======= - /react.js:389:41 - 389| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; ->>>>>>> Add React.Suspense component and tests + /react.js:397:41 + 397| (typeChecker: ReactPropsCheckType) => ReactPropsChainableTypeChecker; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] proptypes_builtins.js:3:23 3| type NoFun = mixed => empty; @@ -2821,24 +2645,14 @@ Cannot cast `React.PropTypes.oneOf` to `NoFun` because: ^^^^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:392:20 - 392| (expectedValues: Array) => ReactPropsChainableTypeChecker; -======= - /react.js:391:20 - 391| (expectedValues: Array) => ReactPropsChainableTypeChecker; ->>>>>>> Add React.Suspense component and tests + /react.js:399:20 + 399| (expectedValues: Array) => ReactPropsChainableTypeChecker; ^^^^^^^^^^ [1] proptypes_builtins.js:3:14 3| type NoFun = mixed => empty; ^^^^^ [2] -<<<<<<< HEAD - /react.js:392:35 - 392| (expectedValues: Array) => ReactPropsChainableTypeChecker; -======= - /react.js:391:35 - 391| (expectedValues: Array) => ReactPropsChainableTypeChecker; ->>>>>>> Add React.Suspense component and tests + /react.js:399:35 + 399| (expectedValues: Array) => ReactPropsChainableTypeChecker; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] proptypes_builtins.js:3:23 3| type NoFun = mixed => empty; @@ -2856,24 +2670,14 @@ Cannot cast `React.PropTypes.oneOfType` to `NoFun` because: ^^^^^^^^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:394:25 - 394| (arrayOfTypeCheckers: Array) => -======= - /react.js:393:25 - 393| (arrayOfTypeCheckers: Array) => ->>>>>>> Add React.Suspense component and tests + /react.js:401:25 + 401| (arrayOfTypeCheckers: Array) => ^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] proptypes_builtins.js:3:14 3| type NoFun = mixed => empty; ^^^^^ [2] -<<<<<<< HEAD - /react.js:395:5 - 395| ReactPropsChainableTypeChecker; -======= - /react.js:394:5 - 394| ReactPropsChainableTypeChecker; ->>>>>>> Add React.Suspense component and tests + /react.js:402:5 + 402| ReactPropsChainableTypeChecker; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] proptypes_builtins.js:3:23 3| type NoFun = mixed => empty; @@ -2891,24 +2695,14 @@ Cannot cast `React.PropTypes.shape` to `NoFun` because: ^^^^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:397:16 - 397| (shapeTypes: { [key: string]: ReactPropsCheckType }) => -======= - /react.js:396:16 - 396| (shapeTypes: { [key: string]: ReactPropsCheckType }) => ->>>>>>> Add React.Suspense component and tests + /react.js:404:16 + 404| (shapeTypes: { [key: string]: ReactPropsCheckType }) => ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] proptypes_builtins.js:3:14 3| type NoFun = mixed => empty; ^^^^^ [2] -<<<<<<< HEAD - /react.js:398:5 - 398| ReactPropsChainableTypeChecker; -======= - /react.js:397:5 - 397| ReactPropsChainableTypeChecker; ->>>>>>> Add React.Suspense component and tests + /react.js:405:5 + 405| ReactPropsChainableTypeChecker; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [3] proptypes_builtins.js:3:23 3| type NoFun = mixed => empty; @@ -3386,59 +3180,76 @@ Cannot call `React.useCallback` because function [1] requires another argument. ^^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:320:38 - v--- - 320| declare export function useCallback( - 321| callback: () => T | void, - 322| inputs: ?$ReadOnlyArray, - 323| ): T; -======= - /react.js:318:38 - v--- - 318| declare export function useCallback( - 319| callback: () => T | void, - 320| inputs: ?$ReadOnlyArray, - 321| ): T; ->>>>>>> Add React.Suspense component and tests + /react.js:326:38 + v---------------------------------------------- + 326| declare export function useCallback) => mixed>( + 327| callback: T, + 328| inputs: ?$ReadOnlyArray, + 329| ): T; ---^ [1] -Error ---------------------------------------------------------------------------------------- useCallback_hook.js:14:13 +Error ---------------------------------------------------------------------------------------- useCallback_hook.js:12:23 -Cannot assign `React.useCallback(...)` to `numeric` because string [1] is incompatible with number [2]. +Cannot assign `callback()` to `str` because number [1] is incompatible with string [2]. - useCallback_hook.js:14:13 - 14| numeric = React.useCallback(() => 'abc'); // Error: is incompatible with number - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + useCallback_hook.js:12:23 + 12| const str: string = callback();// Error: number is incompatible with string. + ^^^^^^^^^^ References: - useCallback_hook.js:14:37 - 14| numeric = React.useCallback(() => 'abc'); // Error: is incompatible with number - ^^^^^ [1] - useCallback_hook.js:10:16 - 10| let numeric: number; - ^^^^^^ [2] + useCallback_hook.js:10:44 + 10| const callback = React.useCallback(() => 123); + ^^^ [1] + useCallback_hook.js:12:14 + 12| const str: string = callback();// Error: number is incompatible with string. + ^^^^^^ [2] -Error ---------------------------------------------------------------------------------------- useCallback_hook.js:15:42 +Error ----------------------------------------------------------------------------------------- useCallback_hook.js:21:3 -Cannot call `React.useCallback` with object literal bound to `inputs` because object literal [1] is incompatible with -read-only array type [2]. +Cannot call `callback` because function [1] requires another argument. - useCallback_hook.js:15:42 - 15| numeric = React.useCallback(() => 123, {}); // Error: object literal is incompatible with +read-only array type - ^^ [1] + useCallback_hook.js:21:3 + 21| callback(true); // Error: function requires another argument. + ^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:322:14 - 322| inputs: ?$ReadOnlyArray, -======= - /react.js:320:14 - 320| inputs: ?$ReadOnlyArray, ->>>>>>> Add React.Suspense component and tests - ^^^^^^^^^^^^^^^^^^^^^ [2] + useCallback_hook.js:16:38 + v------------------------------ + 16| const callback = React.useCallback((num: number, str: string) => { + 17| (num: number); + 18| (str: string); + 19| }); + ^ [1] + + +Error ---------------------------------------------------------------------------------------- useCallback_hook.js:21:12 + +Cannot call `callback` with `true` bound to `num` because boolean [1] is incompatible with number [2]. + + useCallback_hook.js:21:12 + 21| callback(true); // Error: function requires another argument. + ^^^^ [1] + +References: + useCallback_hook.js:16:44 + 16| const callback = React.useCallback((num: number, str: string) => { + ^^^^^^ [2] + + +Error ---------------------------------------------------------------------------------------- useCallback_hook.js:22:12 + +Cannot call `callback` with `'123'` bound to `num` because string [1] is incompatible with number [2]. + + useCallback_hook.js:22:12 + 22| callback('123', 'abc'); // Error: string is incompatible with number. + ^^^^^ [1] + +References: + useCallback_hook.js:16:44 + 16| const callback = React.useCallback((num: number, str: string) => { + ^^^^^^ [2] Error ------------------------------------------------------------------------------------------- useContext_hook.js:6:3 @@ -3446,57 +3257,44 @@ Error -------------------------------------------------------------------------- Cannot call `React.useMutationEffect` because property `useMutationEffect` is missing in object type [1]. useContext_hook.js:6:3 -<<<<<<< HEAD 6| React.useMutationEffect(); // Error: function requires another argument. ^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, + : + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] -======= - 6| React.useContext(); // Error: function requires another argument. - ^^^^^^^^^^^^^^^^^^ - -References: - /react.js:291:37 - v--- - 291| declare export function useContext( - 292| context: React$Context, - 293| observedBits: void | number | boolean, - 294| ): T; - ---^ [1] ->>>>>>> Add React.Suspense component and tests Error ----------------------------------------------------------------------------------------- useContext_hook.js:21:18 @@ -3580,21 +3378,12 @@ Cannot call `React.useEffect` because function [1] requires another argument. ^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:310:36 + /react.js:316:36 v - 310| declare export function useEffect( - 311| create: () => MaybeCleanUpFn, - 312| inputs: ?$ReadOnlyArray, - 313| ): void; -======= - /react.js:308:36 - v - 308| declare export function useEffect( - 309| create: () => MaybeCleanUpFn, - 310| inputs: ?$ReadOnlyArray, - 311| ): void; ->>>>>>> Add React.Suspense component and tests + 316| declare export function useEffect( + 317| create: () => MaybeCleanUpFn, + 318| inputs: ?$ReadOnlyArray, + 319| ): void; ------^ [1] @@ -3607,13 +3396,8 @@ Cannot call `React.useEffect` with `1` bound to `create` because number [1] is i ^ [1] References: -<<<<<<< HEAD - /react.js:311:13 - 311| create: () => MaybeCleanUpFn, -======= - /react.js:309:13 - 309| create: () => MaybeCleanUpFn, ->>>>>>> Add React.Suspense component and tests + /react.js:317:13 + 317| create: () => MaybeCleanUpFn, ^^^^^^^^^^^^^^^^^^^^ [2] @@ -3627,13 +3411,8 @@ type [2]. ^ [1] References: -<<<<<<< HEAD - /react.js:312:14 - 312| inputs: ?$ReadOnlyArray, -======= - /react.js:310:14 - 310| inputs: ?$ReadOnlyArray, ->>>>>>> Add React.Suspense component and tests + /react.js:318:14 + 318| inputs: ?$ReadOnlyArray, ^^^^^^^^^^^^^^^^^^^^^ [2] @@ -3646,23 +3425,13 @@ Cannot call `React.useImperativeMethods` because function [1] requires another a ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:330:47 + /react.js:336:47 v--- - 330| declare export function useImperativeMethods( - 331| ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, - 332| create: () => T, - 333| inputs: ?$ReadOnlyArray, - 334| ): void; -======= - /react.js:328:47 - v--- - 328| declare export function useImperativeMethods( - 329| ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, - 330| create: () => T, - 331| inputs: ?$ReadOnlyArray, - 332| ): void; ->>>>>>> Add React.Suspense component and tests + 336| declare export function useImperativeMethods( + 337| ref: {current: T | null} | ((inst: T | null) => mixed) | null | void, + 338| create: () => T, + 339| inputs: ?$ReadOnlyArray, + 340| ): void; ------^ [1] @@ -3711,21 +3480,12 @@ Cannot call `React.useLayoutEffect` because function [1] requires another argume ^^^^^^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:315:42 + /react.js:321:42 v - 315| declare export function useLayoutEffect( - 316| create: () => MaybeCleanUpFn, - 317| inputs: ?$ReadOnlyArray, - 318| ): void; -======= - /react.js:313:42 - v - 313| declare export function useLayoutEffect( - 314| create: () => MaybeCleanUpFn, - 315| inputs: ?$ReadOnlyArray, - 316| ): void; ->>>>>>> Add React.Suspense component and tests + 321| declare export function useLayoutEffect( + 322| create: () => MaybeCleanUpFn, + 323| inputs: ?$ReadOnlyArray, + 324| ): void; ------^ [1] @@ -3739,13 +3499,8 @@ type [2]. ^ [1] References: -<<<<<<< HEAD - /react.js:316:13 - 316| create: () => MaybeCleanUpFn, -======= - /react.js:314:13 - 314| create: () => MaybeCleanUpFn, ->>>>>>> Add React.Suspense component and tests + /react.js:322:13 + 322| create: () => MaybeCleanUpFn, ^^^^^^^^^^^^^^^^^^^^ [2] @@ -3759,13 +3514,8 @@ type [2]. ^ [1] References: -<<<<<<< HEAD - /react.js:317:14 - 317| inputs: ?$ReadOnlyArray, -======= - /react.js:315:14 - 315| inputs: ?$ReadOnlyArray, ->>>>>>> Add React.Suspense component and tests + /react.js:323:14 + 323| inputs: ?$ReadOnlyArray, ^^^^^^^^^^^^^^^^^^^^^ [2] @@ -3778,21 +3528,12 @@ Cannot call `React.useMemo` because function [1] requires another argument. ^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:325:34 - v--- - 325| declare export function useMemo( - 326| create: () => T, - 327| inputs: ?$ReadOnlyArray, - 328| ): T; -======= - /react.js:323:34 + /react.js:331:34 v--- - 323| declare export function useMemo( - 324| create: () => T, - 325| inputs: ?$ReadOnlyArray, - 326| ): T; ->>>>>>> Add React.Suspense component and tests + 331| declare export function useMemo( + 332| create: () => T, + 333| inputs: ?$ReadOnlyArray, + 334| ): T; ---^ [1] @@ -3822,38 +3563,39 @@ Cannot call `React.useMutationEffect` because property `useMutationEffect` is mi ^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, + : + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -3866,38 +3608,39 @@ Cannot call `React.useMutationEffect` because property `useMutationEffect` is mi ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, + : + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -3910,38 +3653,39 @@ Cannot call `React.useMutationEffect` because property `useMutationEffect` is mi ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, + : + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -3954,38 +3698,39 @@ Cannot call `React.useMutationEffect` because property `useMutationEffect` is mi ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, + : + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -3998,38 +3743,39 @@ Cannot call `React.useMutationEffect` because property `useMutationEffect` is mi ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, + : + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -4042,38 +3788,39 @@ Cannot call `React.useMutationEffect` because property `useMutationEffect` is mi ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, + : + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -4086,38 +3833,39 @@ Cannot call `React.useMutationEffect` because property `useMutationEffect` is mi ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, + : + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -4130,38 +3878,39 @@ Cannot call `React.useMutationEffect` because property `useMutationEffect` is mi ^^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, + : + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -4174,38 +3923,39 @@ Cannot call `React.useMutationEffect` because property `useMutationEffect` is mi ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ References: - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, + : + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -4218,23 +3968,13 @@ Cannot call `React.useReducer` because function [1] requires another argument. ^^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:302:37 - v------ - 302| declare export function useReducer( - 303| reducer: (S, A) => S, - 304| initialState: S, - 305| initialAction: ?A, - 306| ): [S, A => void]; -======= - /react.js:300:37 + /react.js:308:37 v------ - 300| declare export function useReducer( - 301| reducer: (S, A) => S, - 302| initialState: S, - 303| initialAction: ?A, - 304| ): [S, A => void]; ->>>>>>> Add React.Suspense component and tests + 308| declare export function useReducer( + 309| reducer: (S, A) => S, + 310| initialState: S, + 311| initialAction: ?A, + 312| ): [S, A => void]; ----------------^ [1] @@ -4378,7 +4118,7 @@ References: -Found 236 errors +Found 238 errors Only showing the most relevant union/intersection branches. To see all branches, re-run Flow with --show-all-branches diff --git a/tests/react/useCallback_hook.js b/tests/react/useCallback_hook.js index af67b7f1606..0e552b4df29 100644 --- a/tests/react/useCallback_hook.js +++ b/tests/react/useCallback_hook.js @@ -7,10 +7,17 @@ import React from 'react'; } { - let numeric: number; - numeric = React.useCallback(() => 123); // Ok - numeric = React.useCallback(() => 123, []); // Ok - numeric = React.useCallback(() => 123, [1, 2, 3]); // Ok - numeric = React.useCallback(() => 'abc'); // Error: is incompatible with number - numeric = React.useCallback(() => 123, {}); // Error: object literal is incompatible with +read-only array type + const callback = React.useCallback(() => 123); + const num: number = callback(); + const str: string = callback();// Error: number is incompatible with string. +} + +{ + const callback = React.useCallback((num: number, str: string) => { + (num: number); + (str: string); + }); + callback(123, 'abc'); // Ok + callback(true); // Error: function requires another argument. + callback('123', 'abc'); // Error: string is incompatible with number. } diff --git a/tests/react_16_6/react_16_6.exp b/tests/react_16_6/react_16_6.exp index 86d1347ce0d..3de84b4147c 100644 --- a/tests/react_16_6/react_16_6.exp +++ b/tests/react_16_6/react_16_6.exp @@ -10,8 +10,8 @@ References: Suspense.js:12:48 12| } maxDuration="abc" /> // Error: string is incompatible with number ^^^^^ [1] - /react.js:256:19 - 256| maxDuration?: number + /react.js:264:19 + 264| maxDuration?: number ^^^^^^ [2] diff --git a/tests/react_children/react_children.exp b/tests/react_children/react_children.exp index 6ea6d75310c..56f7045f88a 100644 --- a/tests/react_children/react_children.exp +++ b/tests/react_children/react_children.exp @@ -68,13 +68,8 @@ References: api.js:14:25 14| Children.forEach(a, (x: number) => {}); // Error ^^^^^^ [2] -<<<<<<< HEAD - /react.js:265:38 - 265| declare export type ChildrenArray<+T> = $ReadOnlyArray> | T; -======= - /react.js:263:38 - 263| declare export type ChildrenArray<+T> = $ReadOnlyArray> | T; ->>>>>>> Add React.Suspense component and tests + /react.js:271:38 + 271| declare export type ChildrenArray<+T> = $ReadOnlyArray> | T; ^ [3] @@ -95,13 +90,8 @@ References: api.js:16:25 16| Children.forEach(a, (x: string) => {}); // Error ^^^^^^ [2] -<<<<<<< HEAD - /react.js:265:38 - 265| declare export type ChildrenArray<+T> = $ReadOnlyArray> | T; -======= - /react.js:263:38 - 263| declare export type ChildrenArray<+T> = $ReadOnlyArray> | T; ->>>>>>> Add React.Suspense component and tests + /react.js:271:38 + 271| declare export type ChildrenArray<+T> = $ReadOnlyArray> | T; ^ [3] api.js:5:25 5| const a: ChildrenArray = [ @@ -117,13 +107,8 @@ Cannot call `s` with `Children.count(...)` bound to `x` because number [1] is in ^^^^^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:277:42 - 277| count(children: ChildrenArray): number; -======= - /react.js:275:42 - 275| count(children: ChildrenArray): number; ->>>>>>> Add React.Suspense component and tests + /react.js:283:42 + 283| count(children: ChildrenArray): number; ^^^^^^ [1] api.js:29:15 29| function s(x: string) {} diff --git a/tests/react_imports/react_imports.exp b/tests/react_imports/react_imports.exp index 15c335b82c5..edb6446f015 100644 --- a/tests/react_imports/react_imports.exp +++ b/tests/react_imports/react_imports.exp @@ -47,13 +47,8 @@ Cannot get `React.Missing` because property `Missing` is missing in module `reac ^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:371:27 - 371| declare module.exports: $Exports<'react'>; -======= - /react.js:370:27 - 370| declare module.exports: $Exports<'react'>; ->>>>>>> Add React.Suspense component and tests + /react.js:378:27 + 378| declare module.exports: $Exports<'react'>; ^^^^^^^^^^^^^^^^^ [1] @@ -160,13 +155,8 @@ Cannot get `React.Missing` because property `Missing` is missing in module `reac ^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:371:27 - 371| declare module.exports: $Exports<'react'>; -======= - /react.js:370:27 - 370| declare module.exports: $Exports<'react'>; ->>>>>>> Add React.Suspense component and tests + /react.js:378:27 + 378| declare module.exports: $Exports<'react'>; ^^^^^^^^^^^^^^^^^ [1] @@ -196,74 +186,39 @@ Cannot get `React.Node` because property `Node` is missing in object type [1]. ^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:336:26 + /react.js:342:26 v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; -======= - /react.js:334:26 - v- - 334| declare export default {| - 335| +DOM: typeof DOM, - 336| +PropTypes: typeof PropTypes, - 337| +version: typeof version, - 338| +checkPropTypes: typeof checkPropTypes, - 339| +memo: typeof memo, - 340| +lazy: typeof lazy, - 341| +createClass: typeof createClass, - 342| +createContext: typeof createContext, - 343| +createElement: typeof createElement, - 344| +cloneElement: typeof cloneElement, - 345| +createFactory: typeof createFactory, - 346| +createRef: typeof createRef, - 347| +isValidElement: typeof isValidElement, - 348| +Component: typeof Component, + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, : - 350| +Fragment: typeof Fragment, - 351| +Children: typeof Children, - 352| +ConcurrentMode: typeof ConcurrentMode, - 353| +StrictMode: typeof StrictMode, - 354| +Suspense: typeof Suspense, - 355| +useContext: typeof useContext, - 356| +useState: typeof useState, - 357| +useReducer: typeof useReducer, - 358| +useRef: typeof useRef, - 359| +useEffect: typeof useEffect, - 360| +useLayoutEffect: typeof useLayoutEffect, - 361| +useCallback: typeof useCallback, - 362| +useMemo: typeof useMemo, - 363| +useImperativeMethods: typeof useImperativeMethods, - 364| |}; ->>>>>>> Add React.Suspense component and tests + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -276,74 +231,39 @@ Cannot get `React.Node` because property `Node` is missing in object type [1]. ^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:336:26 - v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; -======= - /react.js:334:26 + /react.js:342:26 v- - 334| declare export default {| - 335| +DOM: typeof DOM, - 336| +PropTypes: typeof PropTypes, - 337| +version: typeof version, - 338| +checkPropTypes: typeof checkPropTypes, - 339| +memo: typeof memo, - 340| +lazy: typeof lazy, - 341| +createClass: typeof createClass, - 342| +createContext: typeof createContext, - 343| +createElement: typeof createElement, - 344| +cloneElement: typeof cloneElement, - 345| +createFactory: typeof createFactory, - 346| +createRef: typeof createRef, - 347| +isValidElement: typeof isValidElement, - 348| +Component: typeof Component, + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, : - 350| +Fragment: typeof Fragment, - 351| +Children: typeof Children, - 352| +ConcurrentMode: typeof ConcurrentMode, - 353| +StrictMode: typeof StrictMode, - 354| +Suspense: typeof Suspense, - 355| +useContext: typeof useContext, - 356| +useState: typeof useState, - 357| +useReducer: typeof useReducer, - 358| +useRef: typeof useRef, - 359| +useEffect: typeof useEffect, - 360| +useLayoutEffect: typeof useLayoutEffect, - 361| +useCallback: typeof useCallback, - 362| +useMemo: typeof useMemo, - 363| +useImperativeMethods: typeof useImperativeMethods, - 364| |}; ->>>>>>> Add React.Suspense component and tests + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] @@ -356,74 +276,39 @@ Cannot get `React.Missing` because property `Missing` is missing in object type ^^^^^^^^^^^^^ References: -<<<<<<< HEAD - /react.js:336:26 - v- - 336| declare export default {| - 337| +DOM: typeof DOM, - 338| +PropTypes: typeof PropTypes, - 339| +version: typeof version, - 340| +checkPropTypes: typeof checkPropTypes, - 341| +memo: typeof memo, - 342| +lazy: typeof lazy, - 343| +createClass: typeof createClass, - 344| +createContext: typeof createContext, - 345| +createElement: typeof createElement, - 346| +cloneElement: typeof cloneElement, - 347| +createFactory: typeof createFactory, - 348| +createRef: typeof createRef, - 349| +isValidElement: typeof isValidElement, - 350| +Component: typeof Component, - 351| +PureComponent: typeof PureComponent, - 352| +Fragment: typeof Fragment, - 353| +Children: typeof Children, - 354| +ConcurrentMode: typeof ConcurrentMode, - 355| +StrictMode: typeof StrictMode, - 356| +useContext: typeof useContext, - 357| +useState: typeof useState, - 358| +useReducer: typeof useReducer, - 359| +useRef: typeof useRef, - 360| +useEffect: typeof useEffect, - 361| +useLayoutEffect: typeof useLayoutEffect, - 362| +useCallback: typeof useCallback, - 363| +useMemo: typeof useMemo, - 364| +useImperativeMethods: typeof useImperativeMethods, - 365| |}; -======= - /react.js:334:26 + /react.js:342:26 v- - 334| declare export default {| - 335| +DOM: typeof DOM, - 336| +PropTypes: typeof PropTypes, - 337| +version: typeof version, - 338| +checkPropTypes: typeof checkPropTypes, - 339| +memo: typeof memo, - 340| +lazy: typeof lazy, - 341| +createClass: typeof createClass, - 342| +createContext: typeof createContext, - 343| +createElement: typeof createElement, - 344| +cloneElement: typeof cloneElement, - 345| +createFactory: typeof createFactory, - 346| +createRef: typeof createRef, - 347| +isValidElement: typeof isValidElement, - 348| +Component: typeof Component, + 342| declare export default {| + 343| +DOM: typeof DOM, + 344| +PropTypes: typeof PropTypes, + 345| +version: typeof version, + 346| +checkPropTypes: typeof checkPropTypes, + 347| +memo: typeof memo, + 348| +lazy: typeof lazy, + 349| +createClass: typeof createClass, + 350| +createContext: typeof createContext, + 351| +createElement: typeof createElement, + 352| +cloneElement: typeof cloneElement, + 353| +createFactory: typeof createFactory, + 354| +createRef: typeof createRef, + 355| +isValidElement: typeof isValidElement, + 356| +Component: typeof Component, : - 350| +Fragment: typeof Fragment, - 351| +Children: typeof Children, - 352| +ConcurrentMode: typeof ConcurrentMode, - 353| +StrictMode: typeof StrictMode, - 354| +Suspense: typeof Suspense, - 355| +useContext: typeof useContext, - 356| +useState: typeof useState, - 357| +useReducer: typeof useReducer, - 358| +useRef: typeof useRef, - 359| +useEffect: typeof useEffect, - 360| +useLayoutEffect: typeof useLayoutEffect, - 361| +useCallback: typeof useCallback, - 362| +useMemo: typeof useMemo, - 363| +useImperativeMethods: typeof useImperativeMethods, - 364| |}; ->>>>>>> Add React.Suspense component and tests + 358| +Fragment: typeof Fragment, + 359| +Children: typeof Children, + 360| +ConcurrentMode: typeof ConcurrentMode, + 361| +StrictMode: typeof StrictMode, + 362| +Suspense: typeof Suspense, + 363| +useContext: typeof useContext, + 364| +useState: typeof useState, + 365| +useReducer: typeof useReducer, + 366| +useRef: typeof useRef, + 367| +useEffect: typeof useEffect, + 368| +useLayoutEffect: typeof useLayoutEffect, + 369| +useCallback: typeof useCallback, + 370| +useMemo: typeof useMemo, + 371| +useImperativeMethods: typeof useImperativeMethods, + 372| |}; -^ [1] diff --git a/tests/react_jsx/react_jsx.exp b/tests/react_jsx/react_jsx.exp index 72c8b388398..74fd92e67c6 100644 --- a/tests/react_jsx/react_jsx.exp +++ b/tests/react_jsx/react_jsx.exp @@ -93,13 +93,8 @@ References: test.js:105:12 105| string1={null} ^^^^ [1] -<<<<<<< HEAD - /react.js:406:36 - 406| string: React$PropType$Primitive; -======= - /react.js:405:36 - 405| string: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:413:36 + 413| string: React$PropType$Primitive; ^^^^^^ [2] test.js:106:12 106| string2={null} @@ -107,13 +102,8 @@ References: test.js:107:13 107| boolean1={null} ^^^^ [4] -<<<<<<< HEAD - /react.js:402:34 - 402| bool: React$PropType$Primitive; -======= - /react.js:401:34 - 401| bool: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:409:34 + 409| bool: React$PropType$Primitive; ^^^^^^^ [5] test.js:108:13 108| boolean2={null} @@ -121,13 +111,8 @@ References: test.js:109:11 109| number={null} ^^^^ [7] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [8] @@ -176,13 +161,8 @@ References: test.js:135:54 135| {...{string1: 'foo', string2: 'bar', number: (any: ?number)}} ^^^^^^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] @@ -1674,13 +1654,8 @@ References: /core.js:13:24 13| declare var undefined: void; ^^^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] @@ -1700,13 +1675,8 @@ References: test.js:788:7 788| foo="nope" ^^^^^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] @@ -1726,13 +1696,8 @@ References: test.js:793:7 793| bar="nope" ^^^^^^ [1] -<<<<<<< HEAD - /react.js:404:36 - 404| number: React$PropType$Primitive; -======= - /react.js:403:36 - 403| number: React$PropType$Primitive; ->>>>>>> Add React.Suspense component and tests + /react.js:411:36 + 411| number: React$PropType$Primitive; ^^^^^^ [2] diff --git a/tests/type-at-pos_react/type-at-pos_react.exp b/tests/type-at-pos_react/type-at-pos_react.exp index 399242c7be9..d64796c3370 100644 --- a/tests/type-at-pos_react/type-at-pos_react.exp +++ b/tests/type-at-pos_react/type-at-pos_react.exp @@ -1,5 +1,5 @@ react_component.js:3:9 = { - "type":"{|+Children: {+count: (children: ChildrenArray) => number, +forEach: (children: ChildrenArray, fn: (child: T, index: number) => mixed, thisArg?: mixed) => void, +map: (children: ChildrenArray, fn: (child: $NonMaybeType, index: number) => U, thisArg?: mixed) => Array<$NonMaybeType>, +only: (children: ChildrenArray) => $NonMaybeType, +toArray: (children: ChildrenArray) => Array<$NonMaybeType>}, +ChildrenArray: type ChildrenArray<+T> = $ReadOnlyArray> | T, +Component: class React$Component, +ComponentType: type ComponentType

= React$ComponentType

, +ConcurrentMode: ({children: ?React$Node}) => React$Node, +Context: type Context = React$Context, +DOM: any, +Element: type Element<+C> = React$Element, +ElementConfig: type ElementConfig = React$ElementConfig, +ElementProps: type ElementProps = React$ElementProps, +ElementRef: type ElementRef = React$ElementRef, +ElementType: type ElementType = React$ElementType, +Fragment: ({children: ?React$Node}) => React$Node, +Key: type Key = React$Key, +Node: type Node = React$Node, +Portal: type Portal = React$Portal, +PropTypes: ReactPropTypes, +PureComponent: class React$PureComponent, +Ref: type Ref = React$Ref, +StatelessFunctionalComponent: type StatelessFunctionalComponent

= React$StatelessFunctionalComponent

, +StrictMode: ({children: ?React$Node}) => React$Node, +Suspense: React$ComponentType<{children?: ?React$Node, fallback?: React$Node, maxDuration?: number}>, +checkPropTypes: (propTypes: $Subtype<{[_: $Keys]: ReactPropsCheckType}>, values: V, location: string, componentName: string, getStack: ?(() => ?string)) => void, +cloneElement: React$CloneElement, +createClass: React$CreateClass, +createContext: (defaultValue: T, calculateChangedBits: ?((a: T, b: T) => number)) => React$Context, +createElement: React$CreateElement, +createFactory: (type: ElementType) => React$ElementFactory, +createRef: () => {current: (null | T)}, +default: {|+Children: {+count: (children: ChildrenArray) => number, +forEach: (children: ChildrenArray, fn: (child: T, index: number) => mixed, thisArg?: mixed) => void, +map: (children: ChildrenArray, fn: (child: $NonMaybeType, index: number) => U, thisArg?: mixed) => Array<$NonMaybeType>, +only: (children: ChildrenArray) => $NonMaybeType, +toArray: (children: ChildrenArray) => Array<$NonMaybeType>}, +Component: class React$Component, +ConcurrentMode: ({children: ?React$Node}) => React$Node, +DOM: any, +Fragment: ({children: ?React$Node}) => React$Node, +PropTypes: ReactPropTypes, +PureComponent: class React$PureComponent, +StrictMode: ({children: ?React$Node}) => React$Node, +Suspense: React$ComponentType<{children?: ?React$Node, fallback?: React$Node, maxDuration?: number}>, +checkPropTypes: (propTypes: $Subtype<{[_: $Keys]: ReactPropsCheckType}>, values: V, location: string, componentName: string, getStack: ?(() => ?string)) => void, +cloneElement: React$CloneElement, +createClass: React$CreateClass, +createContext: (defaultValue: T, calculateChangedBits: ?((a: T, b: T) => number)) => React$Context, +createElement: React$CreateElement, +createFactory: (type: ElementType) => React$ElementFactory, +createRef: () => {current: (null | T)}, +isValidElement: (element: any) => boolean, +lazy:

(component: () => React$ComponentType

) => React$ComponentType

, +memo:

(component: React$StatelessFunctionalComponent

, equal?: (P, P) => boolean) => React$StatelessFunctionalComponent

, +useCallback: (callback: () => (T | void), inputs: ?$ReadOnlyArray) => T, +useContext: (context: React$Context, observedBits: (void | number | boolean)) => T, +useEffect: (create: () => MaybeCleanUpFn, inputs: ?$ReadOnlyArray) => void, +useImperativeMethods: (ref: ?({current: (T | null)} | ((inst: (T | null)) => mixed)), create: () => T, inputs: ?$ReadOnlyArray) => void, +useLayoutEffect: (create: () => MaybeCleanUpFn, inputs: ?$ReadOnlyArray) => void, +useMemo: (create: () => T, inputs: ?$ReadOnlyArray) => T, +useReducer: (reducer: (S, A) => S, initialState: S, initialAction: ?A) => [S, (A) => void], +useRef: (initialValue: ?T) => {current: (T | null)}, +useState: (initialState: ((() => S) | S)) => [S, ((((S) => S) | S)) => void], +version: string|}, +isValidElement: (element: any) => boolean, +lazy:

(component: () => React$ComponentType

) => React$ComponentType

, +memo:

(component: React$StatelessFunctionalComponent

, equal?: (P, P) => boolean) => React$StatelessFunctionalComponent

, +useCallback: (callback: () => (T | void), inputs: ?$ReadOnlyArray) => T, +useContext: (context: React$Context, observedBits: (void | number | boolean)) => T, +useEffect: (create: () => MaybeCleanUpFn, inputs: ?$ReadOnlyArray) => void, +useImperativeMethods: (ref: ?({current: (T | null)} | ((inst: (T | null)) => mixed)), create: () => T, inputs: ?$ReadOnlyArray) => void, +useLayoutEffect: (create: () => MaybeCleanUpFn, inputs: ?$ReadOnlyArray) => void, +useMemo: (create: () => T, inputs: ?$ReadOnlyArray) => T, +useReducer: (reducer: (S, A) => S, initialState: S, initialAction: ?A) => [S, (A) => void], +useRef: (initialValue: ?T) => {current: (T | null)}, +useState: (initialState: ((() => S) | S)) => [S, ((((S) => S) | S)) => void], +version: string|}", + "type":"{|+Children: {+count: (children: ChildrenArray) => number, +forEach: (children: ChildrenArray, fn: (child: T, index: number) => mixed, thisArg?: mixed) => void, +map: (children: ChildrenArray, fn: (child: $NonMaybeType, index: number) => U, thisArg?: mixed) => Array<$NonMaybeType>, +only: (children: ChildrenArray) => $NonMaybeType, +toArray: (children: ChildrenArray) => Array<$NonMaybeType>}, +ChildrenArray: type ChildrenArray<+T> = $ReadOnlyArray> | T, +Component: class React$Component, +ComponentType: type ComponentType

= React$ComponentType

, +ConcurrentMode: ({children: ?React$Node}) => React$Node, +Context: type Context = React$Context, +DOM: any, +Element: type Element<+C> = React$Element, +ElementConfig: type ElementConfig = React$ElementConfig, +ElementProps: type ElementProps = React$ElementProps, +ElementRef: type ElementRef = React$ElementRef, +ElementType: type ElementType = React$ElementType, +Fragment: ({children: ?React$Node}) => React$Node, +Key: type Key = React$Key, +Node: type Node = React$Node, +Portal: type Portal = React$Portal, +PropTypes: ReactPropTypes, +PureComponent: class React$PureComponent, +Ref: type Ref = React$Ref, +StatelessFunctionalComponent: type StatelessFunctionalComponent

= React$StatelessFunctionalComponent

, +StrictMode: ({children: ?React$Node}) => React$Node, +Suspense: React$ComponentType<{children?: ?React$Node, fallback?: React$Node, maxDuration?: number}>, +checkPropTypes: (propTypes: $Subtype<{[_: $Keys]: ReactPropsCheckType}>, values: V, location: string, componentName: string, getStack: ?(() => ?string)) => void, +cloneElement: React$CloneElement, +createClass: React$CreateClass, +createContext: (defaultValue: T, calculateChangedBits: ?((a: T, b: T) => number)) => React$Context, +createElement: React$CreateElement, +createFactory: (type: ElementType) => React$ElementFactory, +createRef: () => {current: (null | T)}, +default: {|+Children: {+count: (children: ChildrenArray) => number, +forEach: (children: ChildrenArray, fn: (child: T, index: number) => mixed, thisArg?: mixed) => void, +map: (children: ChildrenArray, fn: (child: $NonMaybeType, index: number) => U, thisArg?: mixed) => Array<$NonMaybeType>, +only: (children: ChildrenArray) => $NonMaybeType, +toArray: (children: ChildrenArray) => Array<$NonMaybeType>}, +Component: class React$Component, +ConcurrentMode: ({children: ?React$Node}) => React$Node, +DOM: any, +Fragment: ({children: ?React$Node}) => React$Node, +PropTypes: ReactPropTypes, +PureComponent: class React$PureComponent, +StrictMode: ({children: ?React$Node}) => React$Node, +Suspense: React$ComponentType<{children?: ?React$Node, fallback?: React$Node, maxDuration?: number}>, +checkPropTypes: (propTypes: $Subtype<{[_: $Keys]: ReactPropsCheckType}>, values: V, location: string, componentName: string, getStack: ?(() => ?string)) => void, +cloneElement: React$CloneElement, +createClass: React$CreateClass, +createContext: (defaultValue: T, calculateChangedBits: ?((a: T, b: T) => number)) => React$Context, +createElement: React$CreateElement, +createFactory: (type: ElementType) => React$ElementFactory, +createRef: () => {current: (null | T)}, +isValidElement: (element: any) => boolean, +lazy:

(component: () => React$ComponentType

) => React$ComponentType

, +memo:

(component: React$StatelessFunctionalComponent

, equal?: (P, P) => boolean) => React$StatelessFunctionalComponent

, +useCallback: ) => mixed>(callback: T, inputs: ?$ReadOnlyArray) => T, +useContext: (context: React$Context, observedBits: (void | number | boolean)) => T, +useEffect: (create: () => MaybeCleanUpFn, inputs: ?$ReadOnlyArray) => void, +useImperativeMethods: (ref: ?({current: (T | null)} | ((inst: (T | null)) => mixed)), create: () => T, inputs: ?$ReadOnlyArray) => void, +useLayoutEffect: (create: () => MaybeCleanUpFn, inputs: ?$ReadOnlyArray) => void, +useMemo: (create: () => T, inputs: ?$ReadOnlyArray) => T, +useReducer: (reducer: (S, A) => S, initialState: S, initialAction: ?A) => [S, (A) => void], +useRef: (initialValue: ?T) => {current: (T | null)}, +useState: (initialState: ((() => S) | S)) => [S, ((((S) => S) | S)) => void], +version: string|}, +isValidElement: (element: any) => boolean, +lazy:

(component: () => React$ComponentType

) => React$ComponentType

, +memo:

(component: React$StatelessFunctionalComponent

, equal?: (P, P) => boolean) => React$StatelessFunctionalComponent

, +useCallback: ) => mixed>(callback: T, inputs: ?$ReadOnlyArray) => T, +useContext: (context: React$Context, observedBits: (void | number | boolean)) => T, +useEffect: (create: () => MaybeCleanUpFn, inputs: ?$ReadOnlyArray) => void, +useImperativeMethods: (ref: ?({current: (T | null)} | ((inst: (T | null)) => mixed)), create: () => T, inputs: ?$ReadOnlyArray) => void, +useLayoutEffect: (create: () => MaybeCleanUpFn, inputs: ?$ReadOnlyArray) => void, +useMemo: (create: () => T, inputs: ?$ReadOnlyArray) => T, +useReducer: (reducer: (S, A) => S, initialState: S, initialAction: ?A) => [S, (A) => void], +useRef: (initialValue: ?T) => {current: (T | null)}, +useState: (initialState: ((() => S) | S)) => [S, ((((S) => S) | S)) => void], +version: string|}", "reasons":[], "loc":{ "source":"react_component.js",