Function: $fromLuaTable()
Call Signature
ts
function $fromLuaTable<K, T>(object: LuaTable<K, T>): Record<K, T>;Treat a Lua table as a TypeScript object.
The plugin removes this call and emits its argument. At runtime it reads the LuaTable entries back into a plain TypeScript object.
Type Parameters
| Type Parameter |
|---|
K extends string | number |
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
object | LuaTable<K, T> | Lua table. |
Returns
Record<K, T>
Same entries as a TypeScript object.
Call Signature
ts
function $fromLuaTable<D>(object: LuaTable<keyof D, D[keyof D]>): D;Treat a Lua table as a TypeScript object.
The plugin removes this call and emits its argument. At runtime it reads the LuaTable entries back into a plain TypeScript object.
Type Parameters
| Type Parameter |
|---|
D |
Parameters
| Parameter | Type | Description |
|---|---|---|
object | LuaTable<keyof D, D[keyof D]> | Lua table. |
Returns
D
Same entries as a TypeScript object.