Skip to content

Allow return symbol in getPropertyName #23

@fisker

Description

@fisker

Currently getPropertyName always return string (bigint is also possible when it's Literal), but property can be a symbol

bar[Symbol.iterator]()

This can be calculated by getStaticValue.

BTW: Similar bug in ESLint core, this will cause foo["Symbol()"] foo[Symbol()] considered as same reference.

I think it should return string | symbol or just return the value as it is, let user convert to string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions