local record Point
x: number
y: number
end
local function scale(point: Point, factor: number): Point
return new Point(x = point.x * factor, y = point.y * factor)
endChecked Lua
.lua, .g.nupp, and .nupp provide plain, gradual, and strict source boundaries. Records, structs, interfaces, unions, refinements, generics, and narrowing add contracts where a module needs them.
Compiler diagnostics carry stable codes, source spans, related locations, repair help, and structured fixes. See the language tour and type system.
