Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rssfrncs opened this issue Jan 17, 2022 · 0 comments

Comments

@rssfrncs
Copy link

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

@rssfrncs rssfrncs changed the title Is Take working correctly? Does Take verify the passed type string against the generic argument? Jan 17, 2022
@rssfrncs rssfrncs changed the title Does Take verify the passed type string against the generic argument? Does Take verify the passed type string argument against the generic argument? Jan 17, 2022
@rssfrncs rssfrncs changed the title Does Take verify the passed type string argument against the generic argument? Does Take verify the passed type string argument against the generic action argument? Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant