Fix Prettier

Reviewed By: hramos

Differential Revision: D5720486

fbshipit-source-id: 374c0c264a714276c39c357aa3fc0737a822a8db
This commit is contained in:
Eli White 2017-08-29 10:58:57 -07:00 committed by Facebook Github Bot
parent bf67345b3b
commit 2d0fe109d7
4 changed files with 39 additions and 21 deletions

View File

@ -252,7 +252,10 @@ type DefaultProps = typeof defaultProps;
* Alternatively, you can provide a custom `keyExtractor` prop. * Alternatively, you can provide a custom `keyExtractor` prop.
* *
*/ */
class SectionList<SectionT: SectionBase<any>> extends React.PureComponent<Props<SectionT>, void> { class SectionList<SectionT: SectionBase<any>> extends React.PureComponent<
Props<SectionT>,
void,
> {
props: Props<SectionT>; props: Props<SectionT>;
static defaultProps: DefaultProps = defaultProps; static defaultProps: DefaultProps = defaultProps;

View File

@ -1221,23 +1221,26 @@ class VirtualizedList extends React.PureComponent<Props, State> {
} }
} }
class CellRenderer extends React.Component<{ class CellRenderer extends React.Component<
CellRendererComponent?: ?React.ComponentType<any>, {
ItemSeparatorComponent: ?React.ComponentType<*>, CellRendererComponent?: ?React.ComponentType<any>,
cellKey: string, ItemSeparatorComponent: ?React.ComponentType<*>,
fillRateHelper: FillRateHelper, cellKey: string,
index: number, fillRateHelper: FillRateHelper,
inversionStyle: ?StyleObj, index: number,
item: Item, inversionStyle: ?StyleObj,
onLayout: (event: Object) => void, // This is extracted by ScrollViewStickyHeader item: Item,
onUnmount: (cellKey: string) => void, onLayout: (event: Object) => void, // This is extracted by ScrollViewStickyHeader
onUpdateSeparators: (cellKeys: Array<?string>, props: Object) => void, onUnmount: (cellKey: string) => void,
parentProps: { onUpdateSeparators: (cellKeys: Array<?string>, props: Object) => void,
getItemLayout?: ?Function, parentProps: {
renderItem: renderItemType, getItemLayout?: ?Function,
renderItem: renderItemType,
},
prevCellKey: ?string,
}, },
prevCellKey: ?string, $FlowFixMeState,
}, $FlowFixMeState> { > {
state = { state = {
separatorProps: { separatorProps: {
highlighted: false, highlighted: false,

View File

@ -133,7 +133,10 @@ type State = {childProps: VirtualizedListProps};
* hood. The only operation that might not scale well is concatting the data arrays of all the * hood. The only operation that might not scale well is concatting the data arrays of all the
* sections when new props are received, which should be plenty fast for up to ~10,000 items. * sections when new props are received, which should be plenty fast for up to ~10,000 items.
*/ */
class VirtualizedSectionList<SectionT: SectionBase> extends React.PureComponent<Props<SectionT>, State> { class VirtualizedSectionList<SectionT: SectionBase> extends React.PureComponent<
Props<SectionT>,
State,
> {
props: Props<SectionT>; props: Props<SectionT>;
state: State; state: State;
@ -301,7 +304,10 @@ class VirtualizedSectionList<SectionT: SectionBase> extends React.PureComponent<
ref && ref.updateSeparatorProps(newProps); ref && ref.updateSeparatorProps(newProps);
}; };
_getSeparatorComponent(index: number, info?: ?Object): ?React.ComponentType<*> { _getSeparatorComponent(
index: number,
info?: ?Object,
): ?React.ComponentType<*> {
info = info || this._subExtractor(index); info = info || this._subExtractor(index);
if (!info) { if (!info) {
return null; return null;
@ -389,7 +395,10 @@ type ItemWithSeparatorProps = {
trailingSection: ?Object, trailingSection: ?Object,
}; };
class ItemWithSeparator extends React.Component<ItemWithSeparatorProps, $FlowFixMeState> { class ItemWithSeparator extends React.Component<
ItemWithSeparatorProps,
$FlowFixMeState,
> {
state = { state = {
separatorProps: { separatorProps: {
highlighted: false, highlighted: false,

View File

@ -31,7 +31,10 @@ const CameraRollView = require('./CameraRollView');
const AssetScaledImageExampleView = require('./AssetScaledImageExample'); const AssetScaledImageExampleView = require('./AssetScaledImageExample');
class CameraRollExample extends React.Component<$FlowFixMeProps, $FlowFixMeState> { class CameraRollExample extends React.Component<
$FlowFixMeProps,
$FlowFixMeState,
> {
state = { state = {
groupTypes: 'SavedPhotos', groupTypes: 'SavedPhotos',
sliderValue: 1, sliderValue: 1,