luttje / luttje/glua-api-snippets
Feature request: Analog of diff for custom declared function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 45
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
I want to write new declaration for some functions, for example, to add **generics** or some complex types (`@nodiscard` or even `integer`) that the wiki does not allow us to use.
However, if I do this in a "custom directory", then I completely replace the function description and eventually it becomes obsolete.
I would prefer to be able to write a "diff" when I can change the parameter types, but not change the parameter name/desc with a full method info.
```lua
--[[... unchanged info ...]]
---@generic T
---@param metaName `T` --[[... unchanged desc ...]]
---@return T? --[[... unchanged desc ...]]
---@nodiscard
function _G.FindMetaTable(metaName) end
```
Do you have any ideas on how to do this? I don't mean the real `diff` that is used in version control systems - maybe it's too complicated.
p.s. But yes, I don't want to write a `@nodiscard` to everything, it's stupid.
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
The issue names custom-directory declarations and the example function FindMetaTable, but no source files or tests. Start by tracing how custom declarations are loaded and merged with generated wiki data. Done would mean defining and implementing a selective override mechanism that can change types or add annotations while preserving unspecified names and descriptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100