TypeScript Version: 2.3.1
Code
import*asReactfrom'react';functiontest<Textendsobject>(Component: React.StatelessComponent<T>,props: T){return<Component{...props}/>~~~~~~~~~~errorTS2698: Spreadtypesmayonlybecreatedfrom object types.}(same with React.ComponentClass)
Expected behavior:
Compile without an error.
Actual behavior:
Error: error TS2698: Spread types may only be created from object types.
That was already reported in closed issue #14112
TypeScript Version: 2.3.1
Code
(same with
React.ComponentClass)Expected behavior:
Compile without an error.
Actual behavior:
Error: error TS2698: Spread types may only be created from object types.
That was already reported in closed issue #14112