Improve Flow Types

Differential Revision: D5963184

fbshipit-source-id: 206f0d52b66f4f1af284445b10a8a4ff7b2cc36d
This commit is contained in:
Naman Goel 2017-10-04 14:44:12 -07:00 committed by Facebook Github Bot
parent 2d2dfa26bc
commit bee33a4400
1 changed files with 6 additions and 5 deletions

View File

@ -23,7 +23,7 @@ import type {Props as VirtualizedSectionListProps} from 'VirtualizedSectionList'
type Item = any;
type SectionBase<SectionItemT> = {
export type SectionBase<SectionItemT> = {
/**
* The data for rendering items in this section.
*/
@ -187,10 +187,11 @@ type OptionalProps<SectionT: SectionBase<any>> = {
legacyImplementation?: ?boolean,
};
export type Props<SectionT> = RequiredProps<SectionT> &
OptionalProps<SectionT> &
VirtualizedSectionListProps<SectionT>;
export type Props<SectionT> = {
...$Exact<RequiredProps<SectionT>>,
...$Exact<OptionalProps<SectionT>>,
...$Exact<VirtualizedSectionListProps<SectionT>>,
};
const defaultProps = {
...VirtualizedSectionList.defaultProps,
stickySectionHeadersEnabled: Platform.OS === 'ios',