An optional type system for Lua that adds compile-time type checking and class-based OOP.
Typed Lua is an optional type system for Lua that adds static typing capabilities to the dynamically-typed language. It provides type annotations, compile-time type checking, and class-based object-oriented programming features while compiling down to standard Lua code. The project helps developers catch type-related errors early and write more maintainable Lua applications.
Lua developers who want to add type safety to their codebases, particularly those working on larger projects where type errors can be costly, and developers transitioning from statically-typed languages who prefer type annotations.
Typed Lua offers gradual typing for Lua, allowing developers to add type safety incrementally without breaking existing code. Unlike some alternatives, it maintains full compatibility with standard Lua virtual machines and provides a runtime module loader for seamless integration.
An Optional Type System for Lua
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows incremental addition of type annotations to existing Lua codebases without breaking functionality, supporting the pragmatic philosophy of the project.
Compile-time type checking identifies type mismatches before runtime, reducing bugs and improving code safety, as highlighted in the key features.
Provides class-based object-oriented programming with classes and interfaces, which Lua lacks natively, enabling more structured code organization.
Compiles to plain Lua and includes a runtime module loader, ensuring full compatibility with standard Lua virtual machines without code changes.
The README explicitly states the project is not actively maintained, posing risks for bug fixes, security updates, and compatibility with newer Lua versions.
Requires LPeg >=0.12 and Lua >=5.1, adding installation hurdles compared to standalone tools, especially in constrained environments.
With no active maintenance, the ecosystem is stagnant, offering fewer resources, examples, and community help compared to alternatives like tl.