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 '{}'.
The text was updated successfully, but these errors were encountered:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.3.1, 2.4.0-dev.20170427
Code
Expected behavior:
Compiles without errors
Actual behavior:
Error:
The text was updated successfully, but these errors were encountered: