I have code that was used to compile in typescript 2.2, but does not work in 2.3.1:
class Component<T extends object> extends React.Component<T, {}> { render() { return <div { ...this.props }></div>; } }
Now I get:
ERROR in ./file.tsx (34,17): error TS2698: Spread types may only be created from object types.
I suspect that this has been fixed with PR (no writing moment), but so far there is a way around this problem?
source share