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
typeFoo={foo: string}typeBar={bar: string}typeBaz={baz: string}typeFBB=Foo|Bar|Bazdeclareconstobj: FBBconstFbbComponent=(props: FBB)=>(<div>{JSON.stringify(props)}</div>)constcomp1=React.createElement(FbbComponent,{ ...obj})// worksconstcomp2=<FbbComponent{...objasFoo}/>// worksconstcomp3=<FbbComponent{...obj}/>// does not work
Expected behavior:
Compiles without errors
Actual behavior:
Error:
Type '{}' is not assignable to type '(IntrinsicAttributes & Foo) | (IntrinsicAttributes & Bar) | (IntrinsicAttributes & Baz)'.
Type '{}' is not assignable to type 'IntrinsicAttributes & Baz'.
Type '{}' is not assignable to type 'Baz'.
Property 'baz' is missing in type '{}'.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Activity
mhegazy commentedon Apr 28, 2017
This is a duplicate of #14112, #15420, #13557, and #14409 fixed by #13288.
mhegazy commentedon May 19, 2017
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.