We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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)
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
The text was updated successfully, but these errors were encountered:
This is tracked by #10727 and fixed by #13288
Sorry, something went wrong.
Ah, ok, that is unfortunate that you didn't make it into 2.3. Closing as dup
fix(deps): Require TypeScript 2.2.x
efe7123
2.3.x introduce a bug with spread types - waiting on microsoft/TypeScript#15420
ac5a707
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: