Skip to content

Commit

Permalink
Pre-suppress errors before the next Flow release
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal]

Reviewed By: fred2028

Differential Revision: D42006446

fbshipit-source-id: de6c327a540e5085ac196679cf7db7db8a681298
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Dec 14, 2022
1 parent 455ca8c commit fc3565c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Libraries/Lists/SectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]}
/>
);
Expand Down
2 changes: 2 additions & 0 deletions Libraries/Lists/__tests__/VirtualizedSectionList-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('VirtualizedSectionList', () => {
// $FlowFixMe[incompatible-type]
{title: 's1', data: [{key: 'i1'}, {key: 'i2'}, {key: 'i3'}]},
]}
// $FlowFixMe[missing-local-annot]
renderItem={({item}) => <item value={item.key} />}
getItem={(data, key) => data[key]}
getItemCount={data => data.length}
Expand Down Expand Up @@ -83,6 +84,7 @@ describe('VirtualizedSectionList', () => {
// $FlowFixMe[incompatible-type]
{
title: 's1',
// $FlowFixMe[incompatible-call]
data: new Array<void>(5).fill().map((_, ii) => ({id: String(ii)})),
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 => (
<CustomSeparatorComponent {...info} text="SECTION SEPARATOR" />
)}
// eslint-disable-next-line react/no-unstable-nested-components
// $FlowFixMe[missing-local-annot]
ItemSeparatorComponent={info => (
<CustomSeparatorComponent {...info} text="ITEM SEPARATOR" />
)}
Expand Down

0 comments on commit fc3565c

Please sign in to comment.