-- meta file describing lua to C++ plugin api
---@class Position
---@field x integer
---@field y integer
---@class CxxAbi
---@field get_pos fun(): Position
abi = {}
-- example lua plugin
function abi.get_pos()
if false then
return ""
end
return {
missing = "fields"
}
end
I am trying to provide type hints for the callbacks that my users can implement. It checks the returned type but it does not warn if fields are missing in the returned type.