18 lines
389 B
TypeScript
18 lines
389 B
TypeScript
|
export class Element {
|
||
|
public name: string;
|
||
|
public parent: string;
|
||
|
public get full_name (): string {
|
||
|
return `${this.parent}_${this.name}`;
|
||
|
}
|
||
|
|
||
|
public constructor (name: string, parent = '') {
|
||
|
this.name = name;
|
||
|
this.parent = parent;
|
||
|
}
|
||
|
|
||
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||
|
public toString (): string {
|
||
|
return this.full_name;
|
||
|
}
|
||
|
}
|