Skip to content

Excess object literals property checking fails when the literal includes a spread #13878

@sandersn

Description

@sandersn

Excess object literal property checking fails when the literal includes a spread.

let x = { b: 1, extra: 2 }
let xx: { a, b }  = { a: 1, ...x, z: 3 } // error for 'z', no error for 'extra'

Actual: No Error

Expected:
Error for 'z', no error for 'extra'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking ChangeWould introduce errors in existing code

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions