API
- class LibTSMClass
-
staticmethod DefineClass(name: <
T
>, superclass:any
, ...: "ABSTRACT") <T:Class
> Defines a new class.
- Parameters:
name (<
T
>) – The name of the classsuperclass (
any
) – The superclass... ("ABSTRACT") – Properties to define the class with
-
staticmethod ConstructWithTable(tbl:
table
, class: <T
>, ...:any
) <T
> Constructs a class from an existing table, preserving its keys.
- Parameters:
tbl (
table
) – The table with existing keys to preserveclass (<
T
>) – The class to construct... (
any
) – Arguments to pass to the constructor
-
staticmethod GetDebugInfo(instStr:
string
, maxDepth:number
, tableLookupFunc?: fun(tbl:table
):string
?)string
? Gets instance properties from an instance string for debugging purposes.
- Parameters:
instStr (
string
) – The string representation of the instancemaxDepth (
number
) – The maximum depth to recurse into tablestableLookupFunc? (fun(tbl:
table
):string
?) – A lookup function which is used to get debug information for an unknown table
- Returns:
_1? (
string
) – The properties dumped as a multiline string
-
staticmethod DefineClass(name: <