TypeScript Version: master
Code
functionf<aextendsObject>(){return{...<a>{}};}functiong<aextendsobject>(){return{...<a>{}};}Expected behavior:
ok
Actual behavior:
index.ts(2,10): error TS2698: Spread types may only be created from object types.
index.ts(5,10): error TS2698: Spread types may only be created from object types.
TypeScript Version: master
Code
Expected behavior:
ok
Actual behavior:
index.ts(2,10): error TS2698: Spread types may only be created from object types.
index.ts(5,10): error TS2698: Spread types may only be created from object types.