Teal is a statically typed dialect of Lua that adds optional type annotations and a small type system on top of Lua while preserving the language's minimalism, portability and embeddability. It supports annotated functions, arrays, maps, records, interfaces, union types and generics, and is implemented as a compiler called tl that emits plain .lua files so typed code runs anywhere Lua runs. The project positions itself as Lua's counterpart to TypeScript: it brings static guarantees and developer tooling without changing runtime semantics or imposing a heavy runtime footprint. A simple annotated function shows how parameters and return values get explicit types while regular Lua interop remains intact.
Tooling and ecosystem focus on practical adoption: a browser playground lets you try the compiler interactively, the compiler is installable via LuaRocks or with prebuilt binaries, and Cyan is recommended for building larger Teal projects. Editor integrations and a language server exist for VS Code and NeoVim. Documentation and a series of recorded talks trace design motivations and progress over several years, development is hosted on GitHub with community forums and Matrix chat, the project began with Hisham Muhammad, is written in Teal itself, and is released under the MIT license.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.