33 lines
481 B
TypeScript
33 lines
481 B
TypeScript
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
type type_object_section_data = {
|
||
|
|
title : string;
|
||
|
|
content : type_object;
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
class type_object_section implements type_object
|
||
|
|
{
|
||
|
|
public readonly kind : string = "section";
|
||
|
|
public readonly data : type_object_section_data;
|
||
|
|
public constructor(data : type_object_section_data) {this.data = data;}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
object_kind_register(
|
||
|
|
"section",
|
||
|
|
(data) => (
|
||
|
|
new type_object_section(
|
||
|
|
{
|
||
|
|
"title": data["title"],
|
||
|
|
"content": data["content"],
|
||
|
|
}
|
||
|
|
)
|
||
|
|
)
|
||
|
|
);
|