> I found it quite nice but I'll also not forget the hours I wasted tracking down nil table corruptions which could have easily been caught by a type checker.
> I had some hope that Luau https://luau-lang.org or Teal https://github.com/teal-language/tl would make things better
Inline type annotations are not a prerequisite for typechecking; there's nothing stopping you from writing straight Lua (or whatever) and then having a separate tool that does typechecking _without_ having to change the language. People are failing to take away the most important lessons from TypeScript.
The same goes, frankly, for languages that ostensibly have typechecking but have such deficient type systems that it's not exactly that much better than not having one. (Like C, for example.) Considering that type annotations are more valued for being a form of documentation than they are valued for making it easier to write the compiler's code generator...
If you have a function like printf that is ostensibly typechecked but not really, and you already have documentation (like man pages) for that function that says that the arguments need to be such-and-such, but the typechecker for your compiler/IDE isn't able to factor that in at or before build time, then that's a compiler/IDE problem, not anything that necessitates a change to the original grammar.