esamattis / immer-reducer

Type-safe and terse reducers with Typescript for React Hooks and Redux
http://npm.im/immer-reducer
MIT License
225 stars 15 forks source link

Obtaining Action Payload Type #54

Open Secretmapper opened 3 years ago

Secretmapper commented 3 years ago

How can one obtain the payload type of an action? This is useful for typing ie redux-saga:

action: typeof actions.specific.payload