LuaLS / LuaLS/lua-language-server
Support variadic generics
Open
Nobody has claimed this yet.
enhancement
feat/generic
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
---@class Test<T...> : { test: fun(): T... }
---@type Test<number, string>
local a
local b, c, d = a.test()
-- b is a number
-- c is a string
-- d is nil
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the Lua annotation example in the issue and trace how the language server represents generic type parameters and function return values. Done means the shown Test<T...> declaration accepts multiple types and infers b as number, c as string, and d as nil; the issue names no files or tests to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100