Skip to content

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

Merged
jakebailey merged 3 commits intomicrosoft:mainfrom
jakebailey:fix-44596
Jun 28, 2022
Merged

Pass contextFlags when getting contextual type of JSX elements/attributes#49707
jakebailey merged 3 commits intomicrosoft:mainfrom
jakebailey:fix-44596

Conversation

@jakebailey
Copy link
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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