Object spreading a Record<string, any>
gives wrong type
#30538
Labels
Duplicate
An existing issue was already created
Record<string, any>
gives wrong type
#30538
TypeScript Version: 3.4.0-dev.20190322
Search Terms:
object spread, Record, index signature
Code
Expected behavior:
obj
has type{p: number} & Record<string, any>
.This matches how typescript handles Object.assign.
Actual behavior:
Type of object-spreaded thing is ignored.
Playground Link:
link
Related Issues:
The text was updated successfully, but these errors were encountered: