1 | /**
|
2 | * Container options.
|
3 | */
|
4 | export interface UseContainerOptions {
|
5 | /**
|
6 | * If set to true, then default container will be used in the case if given container haven't returned anything.
|
7 | */
|
8 | fallback?: boolean;
|
9 | /**
|
10 | * If set to true, then default container will be used in the case if given container thrown an exception.
|
11 | */
|
12 | fallbackOnErrors?: boolean;
|
13 | }
|
14 | /**
|
15 | * Sets container to be used by this library.
|
16 | */
|
17 | export declare function useContainer(iocContainer: {
|
18 | get(someClass: any): any;
|
19 | }, options?: UseContainerOptions): void;
|
20 | /**
|
21 | * Gets the IOC container used by this library.
|
22 | */
|
23 | export declare function getFromContainer<T>(someClass: {
|
24 | new (...args: any[]): T;
|
25 | } | Function): T;
|