LuaClass is a simple class module written in Luau that allows for classes with inheritance similar to TypeScript/JavaScript. It provides a fluent API for defining classes, extending them, and creating instances, making object oriented patterns straightforward in Luau
Features
Simple syntax for defining classes
Supports inheritance with :extends()
Optional init constructor per class
Strictly typed for better user experience
Lightweight, with shared prototype methods for performance
luau provides a lot of primitives to make OOP / ‘classes’ possible but it doesnt simplify inheritance or standardise constructor methods
LuaClass tries to provides better DX and architecture long term IF you’re familiar with JS/TS patterns or other similar languages. its simply opt-in if its for you
this isnt a performance library comparable to raw tables
it trades a tiny amount of runtime overhead for (subjectively) bettter readability, inheritance, and maintainability