Skip to content

Enhancement - Allow ability to specify a default value for --- @paramΒ #1064

@Nexela

Description

@Nexela

Allow the ability to specify a default value for optional params.

Example:

--- @param a number
--- @param b=[32] number
--- @param c=[' '] string
--- @param d=[] any
--- @param e=[MyClass.subclass] MyClass
--- @return boolean
local function test(a, b, c. d, e

end

hovering over test could show
function test(a: number, b=32: number, c=' ': string, d=nil: any, e=MyClass.subclass: MyClass)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfeat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions