Skip to content

Extending alias functionality [Suggestion] #3406

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions