Skip to content

Commit 9e50938

Browse files
liamfdArrayZoneYour
authored andcommitted
Pass State Types to Swiper Component (#1076)
* Pass State Types to Swiper Component * refactor: rename SwiperStates -> SwiperState
1 parent 72c6430 commit 9e50938

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { Component } from 'react'
88

99
declare module 'react-native-swiper' {
10-
interface SwiperStates {
10+
interface SwiperState {
1111
autoplayEnd: false
1212
loopJump: false
1313
width: number
@@ -21,7 +21,7 @@ declare module 'react-native-swiper' {
2121
dir: 'x' | 'y'
2222
}
2323

24-
interface SwiperInternals extends SwiperStates {
24+
interface SwiperInternals extends SwiperState {
2525
isScrolling: boolean
2626
}
2727

@@ -138,7 +138,7 @@ declare module 'react-native-swiper' {
138138
scrollEnabled?: boolean
139139
}
140140

141-
export default class Swiper extends Component<SwiperProps> {
141+
export default class Swiper extends Component<SwiperProps, SwiperState> {
142142
scrollBy: (index?: number, animated?: boolean) => void;
143143
scrollTo: (index: number, animated?: boolean) => void;
144144
}

0 commit comments

Comments
 (0)