Skip to content

Add devtools typings#112

Merged
developit merged 2 commits intodevelopit:masterfrom
joseluisq:master
Sep 20, 2018
Merged

Add devtools typings#112
developit merged 2 commits intodevelopit:masterfrom
joseluisq:master

Conversation

@joseluisq
Copy link
Contributor

Due that Typescript threw me a No declaration file was found for the 'unistore/devtools' module error. This PR fixes it by just adding a devtools.d.ts file.

"unistore": "^3.0.6"

// store.ts
import createStore, { Store } from 'unistore'
import devtools from 'unistore/devtools'

// just like createStore() typing, devtools() will return the `State`
export const store = devtools(createStore({ count: 0 }))
// ...

@developit developit merged commit cdfd1ab into developit:master Sep 20, 2018
@developit
Copy link
Owner

Thanks!

@joseluisq
Copy link
Contributor Author

👍

@joseluisq
Copy link
Contributor Author

Hey! I seems like you forgot (v3.1.0) to publish the devtools.d.ts file.

See https://unpkg.com/unistore@3.1.0/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants