docdef/source/objects/implementations/table.ts
2026-02-23 20:16:38 +01:00

44 lines
566 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"],
}
)
)
);