Open 1156022152 opened 2 years ago
加上---@type 注解就能解决这个问题
在方法定义前一行加 ---@type XXXData 似乎无效
在方法定义前一行加 ---@type XXXData 似乎无效
建议先看一下 注解功能 的相关文档 https://github.com/Tencent/LuaHelper/blob/master/docs/manual/annotate.md
在方法定义前一行加 ---@type XXXData 似乎无效
建议先看一下 注解功能 的相关文档 https://github.com/Tencent/LuaHelper/blob/master/docs/manual/annotate.md
先用 ---@class 注解标记 xxxData 再用 ---@type 注解把 xxxData.Instance 标记为对应的类型就可以了。
在方法定义前一行加 ---@type XXXData 似乎无效
建议先看一下 注解功能 的相关文档 https://github.com/Tencent/LuaHelper/blob/master/docs/manual/annotate.md
先用 ---@Class 注解标记 xxxData 再用 ---@type 注解把 xxxData.Instance 标记为对应的类型就可以了。 ok
在方法定义前一行加 ---@type XXXData 似乎无效
建议先看一下 注解功能 的相关文档 https://github.com/Tencent/LuaHelper/blob/master/docs/manual/annotate.md
先用 ---@Class 注解标记 xxxData 再用 ---@type 注解把 xxxData.Instance 标记为对应的类型就可以了。
---@class XXXData ---@type XXXData.Instance @property typy XXXData.Instance:GetRoleLv() 这样标记还是跳不到GetRoleLv定义的地方
在方法定义前一行加 ---@type XXXData 似乎无效
建议先看一下 注解功能 的相关文档 https://github.com/Tencent/LuaHelper/blob/master/docs/manual/annotate.md
先用 ---@Class 注解标记 xxxData 再用 ---@type 注解把 xxxData.Instance 标记为对应的类型就可以了。
---@Class XXXData ---@type XXXData.Instance @Property typy XXXData.Instance:GetRoleLv() 这样标记还是跳不到GetRoleLv定义的地方
能贴一下你是怎么使用的吗?或者提供一个示例代码文件?我这样使用是可以正常跳转的
在方法定义前一行加 ---@type XXXData 似乎无效
建议先看一下 注解功能 的相关文档 https://github.com/Tencent/LuaHelper/blob/master/docs/manual/annotate.md
先用 ---@Class 注解标记 xxxData 再用 ---@type 注解把 xxxData.Instance 标记为对应的类型就可以了。
---@Class XXXData ---@type XXXData.Instance @Property typy XXXData.Instance:GetRoleLv() 这样标记还是跳不到GetRoleLv定义的地方
能贴一下你是怎么使用的吗?或者提供一个示例代码文件?我这样使用是可以正常跳转的
好,晚一些我弄一个示例文件,因为是内网暂时不太方便,谢谢解答
单例类内部这样定义:XXXData.Instance = self 外部调用:XXXData.Instance:GetRoleLv() 期望是跳转到 GetRoleLv() 方法定义处,但实际总是会跳转到 Instance 定义处。