Skip to content

Disallow { a }Β #325

@Jack-Works

Description

@Jack-Works

Current spec does not allow { ...a }.

You have to write { ...let a } (bind rest to a) or { ...(a) } (test rest with a, where a might be a custom matcher) depends on your intension.

I think we should also do this to { a, b: 1 } to disambiguate { a: a, b: 1 } (match with a) with { b: 1} and has "a" (has a property in it).

Currently, { a } means and has "a".

Or we can do the other way, allowing { ...a } to be { ...(a) }.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions