ldoc
ldoc copied to clipboard
@class tag always trigger : 'class' cannot have multiple values; {MyClass,module}
trafficstars
Hello.
I am trying to document simple lua file with classes, as soon as I try to use the @class tag somewhere, for example on this simple file
--- A Metric
---@class Metric
---@field name string the name of the metric
---@field value number the value of the metric
---@field labels { [string]: string } the labels of the metric
Metric = {}
function Metric:new(object)
object = object or {}
setmetatable(object, self)
self.__index = self
return object
end
return Metric
I keep getting the following error
ldoc --lls -a -d dist/docs/lua src/prometheus/metric.lua
src/prometheus/metric.lua:16: ?: 'class' cannot have multiple values; {Metric,module}
(same without --lls)
No issue however when I run it on file containing for example only a @module annotation.
Is there something broken or am I doing it wrong ?
No issue however with IDE autocompletion with those same annotations (PyCharm)
ldoc v1.5.0
Thanks