You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JSX Attributes should be considered mutable locations #20705
We do not perform mutability widening on jsx attributes as we do for object property assignments. Since we do not do the same kind of inference on jsx (and do not have generic jsx return types), this is difficult to witness (since the literal is compatible with its constraint), but is potentially a big performance hit for JSX users that was hidden. The example below is one case where the difference can be witnessed:
Expected behavior:
Bar's quickinfo shows Bar<string> on both styles of call - TSame is not constrained to string or another literal domain, so its use sites should not be literal locations.
Actual behavior:
Bar's quickinfo shows Bar<"a" | "b"> for the JSX call, but Bar<string> for the normal call.
Activity