piotrwitek / typesafe-actions

Typesafe utilities for "action-creators" in Redux / Flux Architecture
https://codesandbox.io/s/github/piotrwitek/typesafe-actions/tree/master/codesandbox
MIT License
2.41k stars 99 forks source link

Is it even possible to type thunks properly? #239

Open Drevoed opened 4 years ago

Drevoed commented 4 years ago

I am afraid that it is not possible to allow dispatch to accept both RootAction and an AppThunk which uses RootAction and RootState in it because it will result in a self-referential circle

Is there any way to avoid this?