Skip to content

Consider restricting attribute keys syntax to identifiers and strings again #145

Closed
@nicolo-ribaudo

Description

BigInt attribute keys (i.e. import "x" with { 10n: "val" }) need to be converted to strings while parsing, to check for duplicate keys. In SpiderMonkey this would require allocating the bigint at parse time, which is something that does not currently happen (the object { 10n: x } is parsed as { [10n]: x }).

The motivation for allowing number&bigint literals in import attribute keys is for symmetry with object literals.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions