EmmyLua / VSCode-EmmyLua

Lua IDE/Debugger Plugin for VSCode
632 stars 89 forks source link

Update the prototype of `assert()`, replace `any` with the generic `T` #131

Closed zfl9 closed 1 year ago

zfl9 commented 1 year ago

修改 lua 标准库的 assert() 函数的原型(注解),将 类型any 改为 泛型T


避免一个对象被 assert() 包了一层后,丢失类型信息,比如 local obj = assert(getObj())