-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
TypeScript Version: 2.3.1
Code
import * as React from 'react';
function test<T extends object>(Component: React.StatelessComponent<T>, props: T) {
return <Component {...props} />
~~~~~~~~~~ error TS2698: Spread types may only be created from 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
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created