33 lines
489 B
TypeScript
33 lines
489 B
TypeScript
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
type type_element_section_data = {
|
||
|
|
title : string;
|
||
|
|
content : type_element;
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
class type_element_section implements type_element
|
||
|
|
{
|
||
|
|
public readonly kind : string = "section";
|
||
|
|
public readonly data : type_element_section_data;
|
||
|
|
public constructor(data : type_element_section_data) {this.data = data;}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
element_kind_register(
|
||
|
|
"section",
|
||
|
|
(data) => (
|
||
|
|
new type_element_section(
|
||
|
|
{
|
||
|
|
"title": data["title"],
|
||
|
|
"content": data["content"],
|
||
|
|
}
|
||
|
|
)
|
||
|
|
)
|
||
|
|
);
|