Closed as duplicate of#27273
Description
π Search Terms
spread object as const record
π Version & Regression Information
- This is the behavior in every version I tried.
β― Playground Link
No response
π» Code
const x = {'foo': 'bar'} as const
const y: Record<string, string|boolean> = {'foo': true}
const z = {...x, ...y}
π Actual behavior
Type of z
is {'foo':'bar'}
π Expected behavior
Type of z
should be Record<string, string|boolean>
or {'foo':'bar'}&Record<string, string|boolean>
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
No labels