Skip to content

enum support in alias, param and field #602

@ArcSoul

Description

@ArcSoul

Environment(环境)

Name Version
IDEA version 251.23774.437
EmmyLua version 1.4.20-IDEA251
OS Windows 11

What are the steps to reproduce this issue?(重现步骤?)

I have this code.

-- CommandCheckGameMasterLevel
---@class GameMasterLevel
---@field TYPE_MODERATOR number
---@field TYPE_GAME_MASTER number
---@field TYPE_ADMINISTRATOR number

---@type GameMasterLevel
GameMasterLevel = {}
GameMasterLevel.TYPE_MODERATOR = 5
GameMasterLevel.TYPE_GAME_MASTER = 8
GameMasterLevel.TYPE_ADMINISTRATOR = 32

-------------------------------------------------------------------------

---@type fun(objectIndex:number, authorityIndex:GameMasterLevel)
AuthorityDel = AuthorityDel

What happens?(出现什么问题?)

Not autocomplete second parameter with the fields of gamemasterlevel

What were you expecting to happen?(期望?)

I want someone like this, what complete with GameMasterLevel.TYPE_MODERATOR, GameMasterLevel.TYPE_GAME_MASTER, GameMasterLevel.TYPE_ADMINISTRATOR
Image

Example:
https://github.com/LuaLS/lua-language-server/wiki/Annotations#enum

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