31 lines
443 B
TypeScript
31 lines
443 B
TypeScript
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
type type_object_group_data = {
|
||
|
|
members : type_object;
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
class type_object_group implements type_object
|
||
|
|
{
|
||
|
|
public readonly kind : string = "group";
|
||
|
|
public readonly data : type_object_group_data;
|
||
|
|
public constructor(data : type_object_group_data) {this.data = data;}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
object_kind_register(
|
||
|
|
"group",
|
||
|
|
(data, sub) => (
|
||
|
|
new type_object_group(
|
||
|
|
{
|
||
|
|
"members": data["members"].map(x => sub(x))
|
||
|
|
}
|
||
|
|
)
|
||
|
|
)
|
||
|
|
);
|