From fc3565ce8d9a6766c7c4b121c20c8a045190829c Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Tue, 13 Dec 2022 16:50:33 -0800 Subject: [PATCH] Pre-suppress errors before the next Flow release Summary: Changelog: [Internal] Reviewed By: fred2028 Differential Revision: D42006446 fbshipit-source-id: de6c327a540e5085ac196679cf7db7db8a681298 --- Libraries/Lists/SectionList.js | 2 ++ Libraries/Lists/__tests__/VirtualizedSectionList-test.js | 2 ++ .../rn-tester/js/examples/SectionList/SectionList-scrollable.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Libraries/Lists/SectionList.js b/Libraries/Lists/SectionList.js index 3520b31eca9829..d452ee2b7f6419 100644 --- a/Libraries/Lists/SectionList.js +++ b/Libraries/Lists/SectionList.js @@ -248,7 +248,9 @@ export default class SectionList< {...restProps} stickySectionHeadersEnabled={stickySectionHeadersEnabled} ref={this._captureRef} + // $FlowFixMe[missing-local-annot] getItemCount={items => items.length} + // $FlowFixMe[missing-local-annot] getItem={(items, index) => items[index]} /> ); diff --git a/Libraries/Lists/__tests__/VirtualizedSectionList-test.js b/Libraries/Lists/__tests__/VirtualizedSectionList-test.js index e0e861a26e8cf2..2afc9ec0985a6a 100644 --- a/Libraries/Lists/__tests__/VirtualizedSectionList-test.js +++ b/Libraries/Lists/__tests__/VirtualizedSectionList-test.js @@ -23,6 +23,7 @@ describe('VirtualizedSectionList', () => { // $FlowFixMe[incompatible-type] {title: 's1', data: [{key: 'i1'}, {key: 'i2'}, {key: 'i3'}]}, ]} + // $FlowFixMe[missing-local-annot] renderItem={({item}) => } getItem={(data, key) => data[key]} getItemCount={data => data.length} @@ -83,6 +84,7 @@ describe('VirtualizedSectionList', () => { // $FlowFixMe[incompatible-type] { title: 's1', + // $FlowFixMe[incompatible-call] data: new Array(5).fill().map((_, ii) => ({id: String(ii)})), }, ]} diff --git a/packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js b/packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js index 4685baff2f720a..87099cb9d40527 100644 --- a/packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js +++ b/packages/rn-tester/js/examples/SectionList/SectionList-scrollable.js @@ -282,10 +282,12 @@ export function SectionList_scrollable(Props: { ListHeaderComponent={HeaderComponent} ListFooterComponent={FooterComponent} // eslint-disable-next-line react/no-unstable-nested-components + // $FlowFixMe[missing-local-annot] SectionSeparatorComponent={info => ( )} // eslint-disable-next-line react/no-unstable-nested-components + // $FlowFixMe[missing-local-annot] ItemSeparatorComponent={info => ( )}