We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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.9.1
Search Terms: object type, generic, spread, error
Code
function test<T extends object>(a: T) { return { ...a }; }
Expected behavior: No error.
Actual behavior: Error: Spread types may only be created from object types.
Playground Link: Here you go.
Related Issues: None found so far.
The text was updated successfully, but these errors were encountered:
A dup of #13288? But that PR is started 1.5 years ago and there seems to have no progress.
Sorry, something went wrong.
No branches or pull requests
TypeScript Version: 2.9.1
Search Terms:
object type, generic, spread, error
Code
Expected behavior:
No error.
Actual behavior:
Error: Spread types may only be created from object types.
Playground Link:
Here you go.
Related Issues:
None found so far.
The text was updated successfully, but these errors were encountered: