import { HashMap } from "@azera/util/is"; export { HashMap }; export declare type Service = IDefinition | Function | any[]; export declare type Factory = Constructor> | FunctionOf; export declare type ContainerValue = any; export declare type Constructor = new (...args: any[]) => T; export interface IInjectable extends Function { $inject?: string[]; } export declare type MockMethod = (...params: any[]) => ReturnType any) ? O[K] : any>; export declare type MockMethodAsync = (...params: any[]) => Promise any) ? O[K] : any>>; export declare type InjectableFunction = { (...params: any[]): T; $inject?: string[]; }; export declare type FunctionOf = (...params: any[]) => T; export declare type Injectable = InjectableFunction | Function | Array>; export declare type InvokableFunctions = Injectable | Constructor | Factory; export declare type Invokable = InvokableFunctions | string | T; export declare type IServices = HashMap; export interface IAutoTagger { (service: IDefinition): string[]; } export declare type ServiceDefinitionCollection = HashMap; export interface IContainer { set(values: { [name: string]: IDefinition | ContainerValue; }[]): this; set(name: string, value: IDefinition | ContainerValue): this; get(name: string): T | undefined; invoke(value: Invokable): T | undefined; } export interface IDefinition { name: string; service?: T; parameters: (string | Function)[]; properties: HashMap; methods: { [name: string]: (string | Function)[]; }; calls: { [name: string]: (string | Function)[]; }; private: boolean; isFactory: boolean; factory?: Function | IFactory; tags: string[]; invoke: boolean; imports: (string | Function)[]; autoTags: ({ class: Function; tags: string[]; } | IAutoTagger)[]; } export interface IInternalDefinition extends IDefinition { compiled?: boolean; inherited?: boolean; $target?: Function; } export interface IPropertyInjection { lateBinding?: boolean; name?: string | Function; } export interface IFactory { create(...params: any[]): T; } export interface IMethod { context: any; method: string; }