agiledigital / typed-redux-saga

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

Does Take verify the passed type string argument against the generic action argument? #649

Open rssfrncs opened 2 years ago

rssfrncs commented 2 years ago

I assumed Take would verify that a string passed as the first argument would match a known type in the generic argument?

E.g.

type Action = { type: 'my action' }

yield* take<Action>('my actionzzzz', ...)

I expect an error that 'my actionzzzz' is not comparable to 'my action'? Am I using take incorrectly?

TS version 4.5.3