I have the following lua script
Game:register_rcon("", "i[client_id]s[name]", "", function (client_id, args)
print(args.client_id) -- integer
print(args.name) -- string
end)
The string "i[client_id]s[name]" passed to register_rcon determines the shape and types of the callbacks args argument. Right now I typed the callback quite generically
---@param callback fun(client_id: integer, args: table<string, string|integer|nil>) the callback that will be run if a user typed the command name into the remote console
function Game:register_rcon(name, parameters, helptext, callback) end
Can I instead of saying table<string,string|integer|nil> generate a proper table with field names and their types somehow?