Open cloudshadow opened 4 years ago
Hi @cloudshadow
Report is invalid because it's missing info bug I guess rootAction.someActions.success
is not a correct string literal type.
Please follow the bug report template and I will reopen the issue.
provide a full working code example below including actions, reducers and your custom types used in the example.
Hi Piotrwitek i think rootAction.someActions.success is correct
@cloudshadow Ok I have found the reason, it's a reported bug in TypeScript: https://github.com/microsoft/TypeScript/issues/29718
I would recommend to go there and ask in the issue when are they planning to fix it to show the interest coming from the community.
Related issue: #140
TODO: I have to update the documentation to highlight the bug and link to the TypeScript issue
Description
When i use object map style to create reducer i find ts can not get the type of action and state.
Mandatory info
How to Reproduce
CodeSandbox Link
(PASTE HERE your codesandbox link)
No CodeSandbox Link
If no codesandbox, then please provide a full working code example below including actions, reducers and your custom types used in the example.
Expected behavior
when use getType function in object map style ts can get the correct type for action and state
Suggested solution(s)
Project Dependencies