LuaLS / LuaLS/lua-language-server
Enhancement on return values by enum-typed params
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
现在似乎无法将输出与输入的枚举值关联起来?(比如输入的第一个参数是"store"还是"load"决定了返回的是nil还是string,并作相应分析……?)
- 暂时想的实现方式是@overload,完全一样的输入形式,只是枚举值不同,给出不同返回。
- 又或者用某种@generic T,然后加判断(不过感觉这样的功能,你会很难写……)
Similar issue:#1582
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 by reading the related issue #1582 and the proposed @overload and generic approaches in this issue. Define how enum-typed parameters should determine the return type, including the "store" and "load" example. Done means the language server can analyze the corresponding return values correctly.
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