agiledigital / typed-redux-saga

An attempt to bring better TypeScript typing to redux-saga.
MIT License
315 stars 33 forks source link

Add tests showing code that fails in 1.5 that worked in 1.4 #675

Open osmestad opened 1 year ago

osmestad commented 1 year ago

It seems the type inferencing changes on arguments in 1.5 breaks a few patterns in our code.

Added two examples with call where the argument passed is part of a union of values, this now fails as type errors. For strings I'm able to work around it with using as const, but for numbers I do not think that is possible.

I had a look at the code changes in #654 but I'm not sure if there is any easy way to fix this?