You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I seem to be (incorrectly?) getting an error "Spread types may only be created from object types" for a case where the type in question is constrained as object.
The data property is of a type T where T extends object, so why am I not allowed to spread it's properties to a new object?
The code works as intended, I just can't seem to figure out what's required to get rid of the error message. I could just cast it as any of course, but that seems dirty?
The text was updated successfully, but these errors were encountered:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
I seem to be (incorrectly?) getting an error "Spread types may only be created from object types" for a case where the type in question is constrained as
object
.Example here
When I hover over the offending call site:
The
data
property is of a typeT
whereT extends object
, so why am I not allowed to spread it's properties to a new object?The code works as intended, I just can't seem to figure out what's required to get rid of the error message. I could just cast it as
any
of course, but that seems dirty?The text was updated successfully, but these errors were encountered: