You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if it would be possible for LuaLS to infer the types of the arguments passed to pcall based on the signature of its first function argument. This would significantly improve developer experience, especially when working with typed Lua (e.g., EmmyLua annotations) or when relying on auto-completion and type checking.
In this case, it would be great if LuaLS could infer that greet expects a string, and therefore type-check or suggest "world" accordingly when passed to pcall.
Currently, the parameters after the first one are not checked or suggested with much context, making it less ergonomic when using pcall (or other similar functions) for safe calls.
The text was updated successfully, but these errors were encountered:
Hi 👋
I was wondering if it would be possible for LuaLS to infer the types of the arguments passed to
pcall
based on the signature of its first function argument. This would significantly improve developer experience, especially when working with typed Lua (e.g., EmmyLua annotations) or when relying on auto-completion and type checking.Example:
In this case, it would be great if LuaLS could infer that greet expects a string, and therefore type-check or suggest "world" accordingly when passed to
pcall
.Currently, the parameters after the first one are not checked or suggested with much context, making it less ergonomic when using
pcall
(or other similar functions) for safe calls.The text was updated successfully, but these errors were encountered: