Yet another class library - a library for the Lua language for creating classes. Supports constructors, destructors, inheritance, and custom metamethods (with inheritance from the parent). The main difference from other libraries is the support for Lua Language Server annotations.
One day I needed the Lua library to create classes. The basic version, which is an example on lua.org or lua-users.org, didn't suit me. However, the libraries that were publicly available lagged behind in terms of hints to the available entities of your class. After seeing the generic annotation on the LLS wiki and examples for it, I thought it wouldn't be difficult for me to make a suitable one, but there was a problem with the fact that in 4 years (and even more, maybe) (the first release of LLS was on December 16, 2021), no generic classes appeared in the functionality, only a stub of them. However, it was possible to throw the class type into the generator function. So yes, unlike other libraries that return an object of a class to you by throwing various meta-methods on it, this library returns a generator function, where all the magic happens.
Extract content of src directory to your lib directory.
See tests/init.lua file.
yacl licensed under MIT license. See LICENSE for details.