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