import Component from './Component'; import { Constructor } from '../collections/Signable'; import Ecs from './Ecs'; export default class Entity { readonly _id: string; private readonly _children; private _ecs?; private readonly _tags; private readonly _components; private _parent?; constructor(id?: string); get parent(): Entity | undefined; get children(): Entity[]; get components(): Component[]; setEcs(ecs: Ecs): void; addChild(otherEntity: Entity): Entity; addComponent(componentInstance: T): Entity; add(...components: Component[]): Entity; get(constructor: Constructor): C; getRecursive(constructor: Constructor): T | undefined; forEachChild(cb: (e: Entity) => void, recursive?: boolean): void; has(componentConstructor: Constructor): boolean; tag(tagName: string): Entity; hasTag(tagName: string): boolean; remove(componentConstructor: Constructor): Entity; destroy(cascade?: boolean): void; }