diff --git a/.flowconfig b/.flowconfig index 7eec6f416..206069d0d 100644 --- a/.flowconfig +++ b/.flowconfig @@ -41,12 +41,12 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-3]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-3]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-4]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-4]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError unsafe.enable_getters_and_setters=true [version] -^0.43.1 +^0.44.0 diff --git a/Libraries/Lists/MetroListView.js b/Libraries/Lists/MetroListView.js index 125c60584..96f04ca22 100644 --- a/Libraries/Lists/MetroListView.js +++ b/Libraries/Lists/MetroListView.js @@ -28,6 +28,7 @@ type NormalProps = { // Provide either `items` or `sections` items?: ?Array, // By default, an Item is assumed to be {key: string} + // $FlowFixMe - Something is a little off with the type Array sections?: ?Array<{key: string, data: Array}>, /** @@ -39,10 +40,16 @@ type NormalProps = { * Set this true while waiting for new data from a refresh. */ refreshing?: boolean, + /** + * If true, renders items next to each other horizontally instead of stacked vertically. + */ + horizontal?: ?boolean, }; type DefaultProps = { - keyExtractor: (item: Item) => string, + keyExtractor: (item: Item, index: number) => string, }; +/* $FlowFixMe - the renderItem passed in from SectionList is optional there but + * required here */ type Props = NormalProps & DefaultProps; /** @@ -74,7 +81,7 @@ class MetroListView extends React.Component { return this._listRef; } static defaultProps: DefaultProps = { - keyExtractor: (item, index) => item.key || index, + keyExtractor: (item, index) => item.key || String(index), renderScrollComponent: (props: Props) => { if (props.onRefresh) { return ( diff --git a/Libraries/Lists/SectionList.js b/Libraries/Lists/SectionList.js index 0643994d2..757714678 100644 --- a/Libraries/Lists/SectionList.js +++ b/Libraries/Lists/SectionList.js @@ -156,6 +156,8 @@ type OptionalProps> = { * enabled by default on iOS because that is the platform standard there. */ stickySectionHeadersEnabled?: boolean, + + legacyImplementation?: ?boolean, }; type Props = RequiredProps diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 2a909e1c8..16a8b5f9d 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -134,6 +134,8 @@ type OptionalProps = { */ windowSize: number, }; +/* $FlowFixMe - this Props seems to be missing a bunch of stuff. Remove this + * comment to see the errors */ export type Props = RequiredProps & OptionalProps; let _usedIndexForKey = false; diff --git a/local-cli/templates/HelloWorld/_flowconfig b/local-cli/templates/HelloWorld/_flowconfig index fdac4d6d7..7c4a432ca 100644 --- a/local-cli/templates/HelloWorld/_flowconfig +++ b/local-cli/templates/HelloWorld/_flowconfig @@ -36,12 +36,12 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-3]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-3]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-4]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-4]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError unsafe.enable_getters_and_setters=true [version] -^0.43.1 +^0.44.0 diff --git a/package.json b/package.json index 30a5fb051..d57918e8d 100644 --- a/package.json +++ b/package.json @@ -221,7 +221,7 @@ "eslint-plugin-flowtype": "^2.20.0", "eslint-plugin-react": "^6.4.1", "eslint-config-fbjs": "^1.1.1", - "flow-bin": "^0.43.1", + "flow-bin": "^0.44.0", "jest": "19.0.2", "jest-repl": "19.0.2", "jest-runtime": "19.0.2",