Skip to content

API: expose escapeLeadingUnderscores #25343

Closed
@ajafff

Description

@ajafff

Suggestion

Expose escapeLeadingUnserscores as part of the public API. unescapeLeadingUnderscores is already exposed.

Use Cases

My use case is looking up properties on a ts.Type. To correctly handle well-known symbols (__@symbolName), I need to compare directly to Symbol#escapedName. To make this work with regular names, I need to escape them before comparing. Currently I use my own function for escaping the name, which is not the best solution IMO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions