Skip to content

Repo: (ast-utils) Mention behavior around symbols in JSDoc for getStaticValue #8392

Closed
@kirkwaiblinger

Description

@kirkwaiblinger

Suggestion

I discovered in #8390 that getStaticValue considers Symbol.for('static value') a static value, but does not consider Symbol('not static') a static value.

That makes sense if you think about it, but it's not obvious. I think it would be helpful to call that out explicitly in the JSDoc.

Note, looking at the JSDoc, though, it seems to be more or less copied from https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue, which makes sense. so I've opened an issue in that repo as well, eslint-community/eslint-utils#196.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updatinggood first issueGood for newcomerslocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.repo maintenancethings to do with maintenance of the repo, and not with code/docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions