UNPKG

974 BTypeScriptView Raw
1import { ServiceManagerInterface } from './ServiceManagerInterface';
2import { Instantiable } from '../Core';
3import { FactoryInterface } from './FactoryInterface';
4export interface ServiceFactoryType<T> extends Function {
5 (sm?: ServiceManagerInterface): T;
6}
7export declare type FactoriesMapType = Map<Function | string, FactoryInterface>;
8export declare type ServicesMapType = Map<Function | string, Object>;
9export declare type InvokablesMapType<T> = Map<Instantiable<Object> | string, Instantiable<T>>;
10export declare type AliasesType = {
11 [alias: string]: string | Function;
12};
13export declare type SharedMapType = Map<Function | string, Object>;
14export declare type ServiceKeyType<T> = Instantiable<T> | string;
15export declare type ServiceManagerConfigType = Partial<{
16 sharedByDefault: boolean;
17 shared: SharedMapType;
18 services: ServicesMapType;
19 factories: FactoriesMapType;
20 aliases: AliasesType;
21 invokables: InvokablesMapType<Object>;
22}>;