以前在1.0.0rc1的时候,我的代码注释写法是:
GameController.lua在目录src/controller
local GameController = {};
---@module controller.GameController
GameController = class("GameController");
---@function start
-- @param self
function GameController:start()
end
return GameController;
```
main.lua在src目录下
---@field controller.GameController#controller.GameController gameController
local gameController = nil;
local function main()
gameController:start(); -- 这个start函数是有代码提示的.
end
```
在1.0.0rc1的时候我是这样写的,代码注释是有效的,但是我升上1.0.0final和1.0.1之后就不行了.
发觉好像是要把代码注释的controller.GameController改成GameController才有用,是不是现在不支持目录结构了?之后出现同名的类但在不同目录就比较麻烦了.
还是说我之前的写法有问题了,现在新版的IDE有正确的代码注释写法?