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
Conditional type breaks generic inference on jsx in 2.9 #24080
In code below constructing generic jsx element el1 works in 2.8.3, but breaks on 2.9.0-dev.20180512. Constructing el2 in 2.9.0-dev.20180512 works fine - shouldn't these be completely equivalent?
Expected behavior:
Compilation passes without errors.
Actual behavior:
test.tsx:14:33 - error TS2326: Types of property 'foo' are incompatible.
Type 'string' is not assignable to type '"c"'.
14 const el1 = <Test model={model} foo="c" />;
~~~~~~~
Playground Link:
n/a since playground doesn't support jsx
Activity