1 | import { ContainerInstance } from './container-instance.class';
|
2 | import { Token } from './token.class';
|
3 | import { Handler } from './interfaces/handler.interface';
|
4 | import { Constructable } from './types/constructable.type';
|
5 | import { ServiceIdentifier } from './types/service-identifier.type';
|
6 | import { ServiceOptions } from './interfaces/service-options.interface';
|
7 | import { AbstractConstructable } from './types/abstract-constructable.type';
|
8 |
|
9 |
|
10 |
|
11 | export declare class Container {
|
12 | |
13 |
|
14 |
|
15 | static readonly handlers: Handler[];
|
16 |
|
17 | private static readonly globalInstance;
|
18 |
|
19 | private static readonly instances;
|
20 | |
21 |
|
22 |
|
23 | static of(containerId?: string): ContainerInstance;
|
24 | |
25 |
|
26 |
|
27 |
|
28 | static has<T>(type: Constructable<T>): boolean;
|
29 | static has<T>(id: string): boolean;
|
30 | static has<T>(id: Token<T>): boolean;
|
31 | |
32 |
|
33 |
|
34 |
|
35 | static get<T>(type: Constructable<T>): T;
|
36 | static get<T>(type: AbstractConstructable<T>): T;
|
37 | static get<T>(id: string): T;
|
38 | static get<T>(id: Token<T>): T;
|
39 | |
40 |
|
41 |
|
42 |
|
43 | static getMany<T>(id: string): T[];
|
44 | static getMany<T>(id: Token<T>): T[];
|
45 | |
46 |
|
47 |
|
48 | static set<T = unknown>(type: Function, value: any): Container;
|
49 | static set<T = unknown>(type: Constructable<T>, value: any): Container;
|
50 | static set<T = unknown>(type: AbstractConstructable<T>, value: any): Container;
|
51 | static set<T = unknown>(name: string, value: any): Container;
|
52 | static set<T = unknown>(token: Token<T>, value: any): Container;
|
53 | static set<T = unknown>(value: ServiceOptions<T>): Container;
|
54 | static set<T = unknown>(values: ServiceOptions<T>[]): Container;
|
55 | |
56 |
|
57 |
|
58 | static remove(identifierOrIdentifierArray: ServiceIdentifier | ServiceIdentifier[]): Container;
|
59 | |
60 |
|
61 |
|
62 | static reset(containerId?: string): Container;
|
63 | |
64 |
|
65 |
|
66 | static registerHandler(handler: Handler): Container;
|
67 | |
68 |
|
69 |
|
70 | static import(services: Function[]): Container;
|
71 | }
|