Skip to content

Commit 254573b

Browse files
authored
fix: Add missing types definition into CarouselStoreInterface (#237)
* Add missing import into README.md * Add missing types definition into CarouselStoreInterface
1 parent 1795e10 commit 254573b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ Note that you will likely need to subscribe/unsubscribe to changes in order to t
541541
Example:
542542

543543
```js
544-
import React, { useContext } from 'react';
544+
import React, { useContext, useEffect } from 'react';
545545
import { CarouselContext } from 'pure-react-carousel';
546546

547547
export function MyComponentUsingContext() {

typings/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ interface CarouselStoreInterface {
5959
readonly subscribe: (func: () => void) => void
6060
readonly unsubscribe: (func: () => void) => void
6161
readonly updateSubscribers: (cb?: (state: CarouselState) => void) => void
62-
readonly subscribeMasterSpinner: (src) => void
63-
readonly unsubscribeMasterSpinner: (src) => false | object
62+
readonly subscribeMasterSpinner: (src: string) => void
63+
readonly unsubscribeMasterSpinner: (src: string) => false | object
6464
readonly unsubscribeAllMasterSpinner: () => void
65-
readonly masterSpinnerSuccess: (src) => void
66-
readonly masterSpinnerError: (src) => void
65+
readonly masterSpinnerSuccess: (src: string) => void
66+
readonly masterSpinnerError: (src: string) => void
6767
readonly setMasterSpinnerFinished: () => void
6868
readonly isMasterSpinnerFinished: () => boolean
6969
}

0 commit comments

Comments
 (0)