33 lines
471 B
TypeScript
33 lines
471 B
TypeScript
|
|
/**
|
|
*/
|
|
type type_object_link_data = {
|
|
target : string;
|
|
label : (null | string);
|
|
};
|
|
|
|
|
|
/**
|
|
*/
|
|
class type_object_link implements type_object
|
|
{
|
|
public readonly kind : string = "link";
|
|
public readonly data : type_object_link_data;
|
|
public constructor(data : type_object_link_data) {this.data = data;}
|
|
}
|
|
|
|
|
|
/**
|
|
*/
|
|
object_kind_register(
|
|
"link",
|
|
(data) => (
|
|
new type_object_link(
|
|
{
|
|
"target": data["target"],
|
|
"label": (data["label"] ?? null),
|
|
}
|
|
)
|
|
)
|
|
);
|