/** * ReferenceManager associates constructors with a id */ export declare class ReferenceManager { private readonly references; /** * Registers an entity in a reference map so the type can be used instead of the entity name. * This only works if the entity has a constructor function. * * @param entity The entity to be registered */ addReference(entity: T): void; /** * Removes an entity from the reference map. * This only works if the entity has a constructor function. * * @param entity The entity to be removed */ removeReference(entity: T): void; /** * Resolves the name of the given entity. * If the given entity is already a string, the same string will be returned. * If the component cannot be found this method throws an error * * @param reference Entity instance, name or reference * * @returns The entitys name */ resolveName(reference: T | string | Function): string; /** * Resolves the name of the given entity. * If the given entity is already a string, the same string will be returned. * If the component cannot be resolved this method returns null. * * @param reference Entity instance, name or reference * * @returns The entitys name */ resolveNameSafe(reference: T | string | Function): string; }