You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I was wondering, if it is possible to add some Typescript types to make it a bit easier to work with this library in a typescript project (or even just for type hinting in an IDE)
I'm not looking for strong types for everything (but I mean why not :-D ) , but rather for some convenience helper types.
For example
const staticReducer = {
foo: (state: 'foo', action) => state,
nested: { bar: (state: 'bar', action) => state },
}
type State = StateFromDeepReducersMapObject<typeof staticReducer>
I already have a few of these and I'm willing to do a PR.
I'm also a bit afraid that once some types are added, all the exported members from the library have to be (to some extent) typed in order to be able to use them in TS project.
Sooo, I'm not saying I'm going to prepare a PR tomorrow but it could be soon enough. As long as I know somebody will have a look and possibly merge it 😉
The text was updated successfully, but these errors were encountered:
Could be great, yes.
But I'm not a fan of typescript.
It has far more cons than pros to me. Especially it breaks introspection in IDE.
And this does not replace tests.
You can create a PR and I will let you know if it is not breaking anything in a development tools confort.
Yup, I'm aware about some cons, and I know it doesn't replace tests. Not that this library has too many of them :-D
It is all connected to what project you are working with and where you want to use the (un)typed libs
I don't want change any of the source code here. Just add a file or 2.
Hello I was wondering, if it is possible to add some Typescript types to make it a bit easier to work with this library in a typescript project (or even just for type hinting in an IDE)
I'm not looking for strong types for everything (but I mean why not :-D ) , but rather for some convenience helper types.
For example
I already have a few of these and I'm willing to do a PR.
I'm also a bit afraid that once some types are added, all the exported members from the library have to be (to some extent) typed in order to be able to use them in TS project.
Sooo, I'm not saying I'm going to prepare a PR tomorrow but it could be soon enough. As long as I know somebody will have a look and possibly merge it 😉
The text was updated successfully, but these errors were encountered: