Skip to content

Regex unicode property autocompleteΒ #59697

Open
@bgenia

Description

πŸ” Search Terms

regular expressions, unicode character class, unicode property, hints, autocomplete

βœ… Viability Checklist

⭐ Suggestion

Since TS now validates regular expressions including unicode properties and even provides spelling suggestions, why not autocomplete them?

πŸ“ƒ Motivating Example

In this example TS 5.5 understands that the first regex is incorrect:

const re1 = /\p{Emoj}/u // Error: Unknown Unicode property name or value. Did you mean "Emoji"?
const re2 = /\p{Emoji}/u // Ok

πŸ’» Use Cases

It would be convenient if TS suggested available unicode properties when suggestions are triggered inside \p{}/\P{} sequences.

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureDomain: Completion ListsThe issue relates to showing completion lists in an editorSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions