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

Pass contextFlags when getting contextual type of JSX elements/attributes #49707

Merged
merged 3 commits into from
Jun 28, 2022

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Jun 28, 2022

Fixes #44596

The context flags were not being passed through when working with JSX elements/attributes, which meant that instantiateContextualType didn't use the inferences to instantiate the signature.

I think it'd be best if the contextFlags parameter were required, and I have a change that does so (we don't pass flags in a few more places, likely also unintentionally), but doing so doesn't seem to reveal any baseline changes. I was hoping that #45596 could be fixed as a result, but just fixing up the flag plumbing doesn't seem to help.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jun 28, 2022
@jakebailey jakebailey requested review from sandersn and weswigham June 28, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arguments to callback prop of generic React component are not inferred
3 participants