-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Typescript types #69
Comments
Not really sold on this idea. I just don't think there's that much of a win. I looked at the repo you linked to and didn't see many types, what am I missing? |
On Typescript: As I understand it, properly typing What I think is worth it to be discussed is partial typing or just more information support regarding the actions and selectors. 2 high impact points:
I don't have a lot of experience in typing libraries yet, but I would like to try my hand on it. Note: on the other side I have a successful PoC of |
I know it's not a priority for the project, but for those interested I think there's hope with some TypeScript updates... This PR for TypeScript 4.4 allows the use of template literal strings for type keys. That allows something like this (one step in adding types to this lib)... type BundleType = {
name: string;
getReducer: GetReducerType;
[key: `select${string}`]: SelectorType;
[key: `do${string}`]: ActionCreatorType;
[key: `react${string}`]: ReactorType;
}; Not asking for it to be added to the project, just sharing as someone who loves |
That's awesome and very helpful, thanks! I've got a .d.ts file I've started on the "other" side with types for the redux-bundler lib itself. I'll share here when I get something that feels like a decent starting point on that part. |
Great to see this is being opened again. I've also done some work with typing on my own apps, both on the connect and the store itself. TS 4.4 opens up a lot of possibilities for a |
After a quick look this repo and the build tool being used
microbundle
now supports typescript.It would be nice to allow for this type of support
I have a quick and dirty branch of something like this
https://github.com/vujita/redux-bundler/tree/typscript
The text was updated successfully, but these errors were encountered: