@@ -146,12 +146,12 @@ export interface ICarouselInstance {
146146 * Scroll to previous item, it takes one optional argument (count),
147147 * which allows you to specify how many items to cross
148148 */
149- prev : ( count ?: number ) => void ;
149+ prev : ( opts ?: TCarouselActionOptions ) => void ;
150150 /**
151151 * Scroll to next item, it takes one optional argument (count),
152152 * which allows you to specify how many items to cross
153153 */
154- next : ( count ?: number ) => void ;
154+ next : ( opts ?: TCarouselActionOptions ) => void ;
155155 /**
156156 * Get current item index
157157 */
@@ -165,7 +165,7 @@ export interface ICarouselInstance {
165165 * Use value to scroll to a position where relative to the current position,
166166 * scrollTo(-2) is equivalent to prev(2), scrollTo(2) is equivalent to next(2)
167167 */
168- scrollTo : ( value : number , animated ?: boolean ) => void ;
168+ scrollTo : ( opts ?: TCarouselActionOptions ) => void ;
169169}
170170
171171export interface CarouselRenderItemInfo < ItemT > {
@@ -177,3 +177,9 @@ export interface CarouselRenderItemInfo<ItemT> {
177177export type CarouselRenderItem < ItemT > = (
178178 info : CarouselRenderItemInfo < ItemT >
179179) => React . ReactElement ;
180+
181+ export interface TCarouselActionOptions {
182+ count ?: number ;
183+ animated ?: boolean ;
184+ onFinished ?: ( ) => void ;
185+ }
0 commit comments