Skip to content

Commit

Permalink
Pass State Types to Swiper Component (leecade#1076)
Browse files Browse the repository at this point in the history
* Pass State Types to Swiper Component

* refactor: rename SwiperStates -> SwiperState
  • Loading branch information
liamfd authored and ArrayZoneYour committed Oct 3, 2019
1 parent 72c6430 commit 9e50938
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { Component } from 'react'

declare module 'react-native-swiper' {
interface SwiperStates {
interface SwiperState {
autoplayEnd: false
loopJump: false
width: number
Expand All @@ -21,7 +21,7 @@ declare module 'react-native-swiper' {
dir: 'x' | 'y'
}

interface SwiperInternals extends SwiperStates {
interface SwiperInternals extends SwiperState {
isScrolling: boolean
}

Expand Down Expand Up @@ -138,7 +138,7 @@ declare module 'react-native-swiper' {
scrollEnabled?: boolean
}

export default class Swiper extends Component<SwiperProps> {
export default class Swiper extends Component<SwiperProps, SwiperState> {
scrollBy: (index?: number, animated?: boolean) => void;
scrollTo: (index: number, animated?: boolean) => void;
}
Expand Down

0 comments on commit 9e50938

Please sign in to comment.