Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否无侵入的为第三方lua代码添加注解 #84

Open
fomiao opened this issue Nov 15, 2021 · 2 comments
Open

能否无侵入的为第三方lua代码添加注解 #84

fomiao opened this issue Nov 15, 2021 · 2 comments
Labels
question Further information is requested

Comments

@fomiao
Copy link

fomiao commented Nov 15, 2021

由于第三方代码需要频繁更新,不希望修改他们的代码

@CppCXY
Copy link
Member

CppCXY commented Nov 16, 2021

自己创建一个目录写一些不会被使用的文件比如叫http.d.lua 在里面写注释类
---@Class ffff
local ffff = {}
function ffff:aaaa()
end
就行了

@fomiao
Copy link
Author

fomiao commented Nov 16, 2021

自己创建一个目录写一些不会被使用的文件比如叫http.d.lua 在里面写注释类 ---@Class ffff local ffff = {} function ffff:aaaa() end 就行了

虽然上面说的是可以的,但是有相当工作量和维护量
举例:
helper文件有大量的接口,由于是第三方库我不能修改,所以如果可以如下定义就方便多了,无需我再取列举helper类的接口
---@Class Helper
require "3d_party.helper"

@CppCXY CppCXY added the question Further information is requested label Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants