TableType – Luau Type Generator
Generate export type definitions from Luau table literals in one keystroke.
Usage
- Select a Luau table literal or type in the editor.
- Press
Ctrl+Shift+T (or right-click → TableType).
- Enter the root type name.
- Pick a generation mode.
Unified mode
Each nested table becomes its own named type, declared before the parent.
-- Input (selected):
local Character = {
Head = {},
Torso = {},
Arms = {},
Legs = {},
}
-- Output:
export type Head = {}
export type Torso = {}
export type Arms = {}
export type Legs = {}
export type Character = {
Head: Head,
Torso: Torso,
Arms: Arms,
Legs: Legs,
}
Children mode
Nested tables stay inline.
export type Character = {
Head: {},
Torso: {},
Arms: {},
Legs: {},
}
Commands
| Command |
Description |
TableType: Generate Types (Pick Mode)… |
Interactive picker (Ctrl+Shift+T) |
TableType: Generate Unified Types |
Always Unified |
TableType: Generate Children Types |
Always Children |
Settings
| Setting |
Default |
Description |
tabletype.insertPosition |
replace |
replace · above · below · clipboard |
tabletype.exportKeyword |
export type |
export type or type |
tabletype.trailingComma |
false |
Add trailing comma on last field |