fix(types): SwiperProps extends ScrollView base type
As index.js L772 shows, {...this.props} used on ScrollView
This commit is contained in:
parent
7030c13224
commit
11699645bc
10
index.d.ts
vendored
10
index.d.ts
vendored
@ -2,7 +2,8 @@ import {
|
||||
ViewStyle,
|
||||
StyleProp,
|
||||
NativeSyntheticEvent,
|
||||
NativeScrollEvent
|
||||
NativeScrollEvent,
|
||||
ScrollViewProps
|
||||
} from 'react-native'
|
||||
import { Component } from 'react'
|
||||
|
||||
@ -25,7 +26,8 @@ declare module 'react-native-swiper' {
|
||||
isScrolling: boolean
|
||||
}
|
||||
|
||||
interface SwiperProps {
|
||||
interface SwiperProps
|
||||
extends Omit<ScrollViewProps, 'onScrollBeginDrag' | 'onMomentumScrollEnd'> {
|
||||
// Basic
|
||||
// If true, the scroll view's children are arranged horizontally in a row instead of vertically in a column.
|
||||
horizontal?: boolean
|
||||
@ -139,7 +141,7 @@ declare module 'react-native-swiper' {
|
||||
}
|
||||
|
||||
export default class Swiper extends Component<SwiperProps> {
|
||||
scrollBy: (index?: number, animated?: boolean) => void;
|
||||
scrollTo: (index: number, animated?: boolean) => void;
|
||||
scrollBy: (index?: number, animated?: boolean) => void
|
||||
scrollTo: (index: number, animated?: boolean) => void
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user