Closed hsz closed 4 years ago
Hey @hsz,
What is the result of tsc
, is it showing you an error?
IDE related issues should not be a concern of this library.
As mentioned - this is just the IDE warning. tsc
does not complain about it.
I'm just wondering if current types aren't too complex/hacky?
IDE warning is using TS language services, maybe it's a bug in IDE or language services API. I would recommend searching in TS Github repo as I'm not aware of such issues and if tsc compiler doesn't show an error than it's not directly related to the library code.
Sure, I'll report it to JetBrains then.
@hsz you can also try to check in vscode and see if the same error happen in vscode, then you'll know if the issue is in PHPStorm or in language services.
Description
I have noticed that after upgrading library to 5.0.0-3, PhpStorm complains when I add more than one
handleAction
to my reducer. IDE shows following inspection warning:I am not sure, if
typesafe-actions
can be improved to avoid such warning or there is nothing that can be done and issue is caused because of their glitch. However, I'd like to verify that with you at first.Steps to Reproduce
createReducer(initialState)
.CodeSandbox to help you reproduce issue in isolation https://github.com/hsz/typesafe-actions-issue
Exact file with the issue: https://github.com/hsz/typesafe-actions-issue/blob/master/src/reducers/content.ts
Expected behavior
PhpStorm should not show any warning.
Project Dependencies
Environment (optional)