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.
*
*/
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>;
static defaultProps: DefaultProps = defaultProps;

View File

@ -1221,23 +1221,26 @@ class VirtualizedList extends React.PureComponent<Props, State> {
}
}
class CellRenderer extends React.Component<{
CellRendererComponent?: ?React.ComponentType<any>,
ItemSeparatorComponent: ?React.ComponentType<*>,
cellKey: string,
fillRateHelper: FillRateHelper,
index: number,
inversionStyle: ?StyleObj,
item: Item,
onLayout: (event: Object) => void, // This is extracted by ScrollViewStickyHeader
onUnmount: (cellKey: string) => void,
onUpdateSeparators: (cellKeys: Array<?string>, props: Object) => void,
parentProps: {
getItemLayout?: ?Function,
renderItem: renderItemType,
class CellRenderer extends React.Component<
{
CellRendererComponent?: ?React.ComponentType<any>,
ItemSeparatorComponent: ?React.ComponentType<*>,
cellKey: string,
fillRateHelper: FillRateHelper,
index: number,
inversionStyle: ?StyleObj,
item: Item,
onLayout: (event: Object) => void, // This is extracted by ScrollViewStickyHeader
onUnmount: (cellKey: string) => void,
onUpdateSeparators: (cellKeys: Array<?string>, props: Object) => void,
parentProps: {
getItemLayout?: ?Function,
renderItem: renderItemType,
},
prevCellKey: ?string,
},
prevCellKey: ?string,
}, $FlowFixMeState> {
$FlowFixMeState,
> {
state = {
separatorProps: {
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
* 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>;
state: State;
@ -301,7 +304,10 @@ class VirtualizedSectionList<SectionT: SectionBase> extends React.PureComponent<
ref && ref.updateSeparatorProps(newProps);
};
_getSeparatorComponent(index: number, info?: ?Object): ?React.ComponentType<*> {
_getSeparatorComponent(
index: number,
info?: ?Object,
): ?React.ComponentType<*> {
info = info || this._subExtractor(index);
if (!info) {
return null;
@ -389,7 +395,10 @@ type ItemWithSeparatorProps = {
trailingSection: ?Object,
};
class ItemWithSeparator extends React.Component<ItemWithSeparatorProps, $FlowFixMeState> {
class ItemWithSeparator extends React.Component<
ItemWithSeparatorProps,
$FlowFixMeState,
> {
state = {
separatorProps: {
highlighted: false,

View File

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