-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
This definition:
glua-api-snippets/library/hook.lua
Line 182 in 443fce9
| ---@overload fun(eventName: "PlayerLoadout", identifier: any, func: fun(ply: Player)) |
Results in this warning:
Despite the wiki not describing a return value for PlayerLoadout and similar hooks, since hook.Run will cease calling further hooks if any not-nil value is returned the code is valid and should not warn.
Perhaps if the hook has no return value on the wiki we should have it be any by default.
And untested, but there is likely a warning when the inverse happens, so in that case I guess we should have all returns in hooks be nillable.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed