Fix lint errors introduced in tslint@5.2 (#16330)

This commit is contained in:
Mohamed Hegazy
2017-05-04 15:48:57 -07:00
committed by GitHub
parent e564537f7f
commit ff4eaf5d61
4 changed files with 22 additions and 28 deletions

View File

@@ -42,8 +42,8 @@ class SnapCarouselTest extends React.Component<{}, {}> {
const styles = StyleSheet.create({
container: {
flex: 1
} as ViewStyle,
},
item: {
width: 75
} as ViewStyle
}
});

View File

@@ -35,28 +35,28 @@ class SwiperTest extends React.Component<{}, {}> {
const styles = StyleSheet.create({
wrapper: {
} as ViewStyle,
},
slide1: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#9DD6EB'
} as ViewStyle,
},
slide2: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#97CAE5'
} as ViewStyle,
},
slide3: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#92BBD9'
} as ViewStyle,
},
text: {
color: '#fff',
fontSize: 30,
fontWeight: 'bold'
} as ViewStyle
}
});

View File

@@ -78,24 +78,24 @@ const styles = StyleSheet.create<LocalStyles>(
//alternative declaration of styles (inline typings)
const stylesAlt = StyleSheet.create(
{
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
} as ViewStyle,
welcome: {
fontSize: 20,
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
} as TextStyle,
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
textAlign: 'center',
color: '#333333',
marginBottom: 5,
} as TextStyle
}
}
)
);
class CustomView extends React.Component<{}, {}> {

View File

@@ -63,17 +63,11 @@ export type OverscanIndices = {
export type CellSizeAndPositionManager = {
areOffsetsAdjusted(): boolean;
configure({
cellCount,
estimatedCellSize
}: ConfigureParams): void;
configure({ cellCount, estimatedCellSize }: ConfigureParams): void;
getCellCount(): number;
getEstimatedCellSize(): number;
getLastMeasuredIndex(): number;
getOffsetAdjustment({
containerSize,
offset // safe
}: ContainerSizeAndOffset): number;
getOffsetAdjustment({ containerSize, offset/*safe*/ }: ContainerSizeAndOffset): number;
/**
* This method returns the size and position for the cell at the specified index.
* It just-in-time calculates (or used cached values) for cells leading up to the index.