LuaLS / LuaLS/lua-language-server

Feature Request: Argument<> or Parameter<> type

Open
#2,278 0 comments 0 reactions 0 assignees View on GitHub

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

In typescript there is a Parameters<Type>: https://www.typescriptlang.org/docs/handbook/utility-types.html#parameterstype, that allows one to easily get the parameters of a function. In an event rpc system I am currently working on, something like this would be useful where I could do something like ---@overload fun(event: function_name, ...: Parameters<function_name>))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or implementation entry point is identified in the issue. Start by locating the annotation handling and type-system code for overloads and generic types, then compare the requested behavior with TypeScript's Parameters semantics. Done means Parameters or an equivalent argument type works in the shown overload form and has coverage for representative function types.

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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.