23 lines
418 B
TypeScript
23 lines
418 B
TypeScript
import { ISType } from './ISType';
|
|
|
|
export class Type {
|
|
|
|
name: string;
|
|
description: string;
|
|
abstract: boolean;
|
|
parent: Type;
|
|
children: Type[];
|
|
|
|
constructor(isType: ISType) {
|
|
this.name = isType.name;
|
|
this.description = isType.description;
|
|
this.abstract = isType.abstract;
|
|
this.children = new Array();
|
|
}
|
|
|
|
addChild(type: Type) {
|
|
type.parent = this;
|
|
this.children.push(type);
|
|
}
|
|
|
|
} |