type
Updatedtype Id = number type Pair<T> = { first: T, second: T } export type Size = { w: number }
A name for a type. The alias is Luau's and passes through. <T> takes parameters, and every use of the alias passes them on.
export type sends the alias out. A type has no value at run time, so the module's table carries no key for it: a bare import { Size } binds the type alone, and the emit writes type Size = _m1.Size.
type in front of one name in an import list marks that name as a type, import { f, type Size }. import type { } marks the whole list. Both cost nothing at run time: the build drops the require of a line that binds types alone, so two modules may name each other's types. The check artifact keeps the line, so the types still check.
An interface is the same thing with a body; alloy doc interface has it.
The word is also free as a name. type before a name and an = declares; type(x), type = f, and t.type read the Luau way, so a local named type may hold Luau's type.
