Skip to content

Extending alias functionality [Suggestion] #3406

@paulevsGitch

Description

@paulevsGitch

Good day, my suggestion is quite unusual - I'm requesting an additional functionality for aliases, basically adding ability to define regexp for string-based aliases. For example I have something like this:

---@alias Identifier string

That makes type check that Identifier is a string, but don't check if identifier need a custom structure, for example if correct structure is something like namespace:path it can't be validated with LLS.

If on another hand I can able to add a regexp to it:

---@alias Identifier string("^[^:]*:[^:]*$")

Then it will automatically check if identifier is valid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions