Support for Luau type annotations
3dsboy08 opened this issue · 1 comments
3dsboy08 commented
Luau has a concept of 'typed Lua' - i.e TypeScript style type annotations for Lua.
This is a custom syntax extension specific to Luau/Roblox.
See syntax here: https://roblox.github.io/luau/syntax
Some examples:
function foo(x: number, y: string): boolean
local k: string = y:rep(x)
return k == "a"
end
type Point = { x: number, y: number }
type Array<T> = { [number]: T }
type Something = typeof(string.gmatch("", "\d"))
GGG-KILLER commented
I'm gonna comment here so that people don't get their hopes up much.
This isn't a high priority on my list (since to begin with, this wasn't supposed to work with roblox lua), but it will get implemented.
I have other things I want to do first before I add luau typed lua support such as finishing the rewrite and getting a language server up and running though.