UNPKG

755 BTypeScriptView Raw
1import { NestContainer } from './container';
2import { InstanceWrapper } from './instance-wrapper';
3import { InstanceToken } from './module';
4export interface InstanceLink<T = any> {
5 token: InstanceToken;
6 wrapperRef: InstanceWrapper<T>;
7 collection: Map<any, InstanceWrapper>;
8 moduleId: string;
9}
10export declare class InstanceLinksHost {
11 private readonly container;
12 private readonly instanceLinks;
13 constructor(container: NestContainer);
14 get<T = any>(token: InstanceToken): InstanceLink<T>;
15 get<T = any>(token: InstanceToken, options?: {
16 moduleId?: string;
17 each?: boolean;
18 }): InstanceLink<T> | Array<InstanceLink<T>>;
19 private initialize;
20 private addLink;
21 private getInstanceNameByToken;
22}