Closed Zash closed 6 years ago
Do you mean that luacheck should find type errors according to these definition files? Isn't is the role of TypedLua itself to do that? If you mean that luacheck should simply allow working with globals listed in the definition file it could be useful to avoid duplication of custom globals in TypedLua definition and .luacheckrc.
I'm basically looking for a way to get some of the benefits of static typing without the need to rewrite a large codebase in a statically typed language. As I said, it might be out of scope for luacheck.
I like the idea of some less strict type checking that prioritizes avoiding false positives, using type annotations more as hints rather than assertions. However, it's indeed out with of scope for luacheck IMO. Even if at some point luacheck gets this type of type checking then it'll probably have its own definition format.
This may be out of scope and/or overlap with #129 but I would very much like to have something that understood TypedLua definition files and pointed out violations.