docdef/source/objects/implementations/table.ts

34 lines
538 B
TypeScript

/**
*/
type type_object_table_data = {
head : (null | Array<type_object>);
rows : Array<Array<type_object>>;
};
/**
* @todo check sanity (length of head and rows)
*/
class type_object_table implements type_object
{
public readonly kind : string = "table";
public readonly data : type_object_table_data;
public constructor(data : type_object_table_data) {this.data = data;}
}
/**
*/
object_kind_register(
"table",
(data) => (
new type_object_table(
{
"head": data["head"],
"rows": data["rows"],
}
)
)
);