import { Registration } from './Registration'; import { IContainer } from './IContainer'; import { ProviderMap, Provider } from './core/index'; /** * symbol type */ export declare type SymbolType = Type | AbstractType | string | symbol; /** * factory tocken. */ export declare type Token = Registration | SymbolType; /** * providers */ export declare type Providers = any | ObjectMap | ProviderMap | Provider; /** * instance factory. */ export declare type InstanceFactory = (...providers: Providers[]) => T; /** * to instance via container. */ export declare type ToInstance = (container?: IContainer, ...providers: Providers[]) => T; /** * Factory of Token */ export declare type Factory = T | Type | ToInstance; /** * object map. * * @export * @interface ObjectMap * @template T */ export interface ObjectMap { [index: string]: T; } /** * class Annations * * @export * @interface ClassAnnations */ export interface ClassAnnations { /** * class name * * @type {string} * @memberof ClassAnnations */ name: string; /** * class params declaration. * * @type {ObjectMap} * @memberof ClassAnnations */ params: ObjectMap; } /** * class type * @export * @interface Type * @extends {Function} * @template T */ export interface Type extends Function { new (...args: any[]): T; classAnnations?: ClassAnnations; } /** * abstract type * * @export * @interface AbstractType * @extends {Function} * @template T */ export interface AbstractType extends Function { new?(...args: any[]): T; classAnnations?: ClassAnnations; } /** * express. * * @export * @interface Express * @template T * @template TResult */ export interface Express { (item: T): TResult; } /** * express * * @export * @interface Express2 * @template T1 * @template T2 * @template TResult */ export interface Express2 { (arg1: T1, arg2: T2): TResult; } /** * express * * @export * @interface Express3 * @template T1 * @template T2 * @template T3 * @template TResult */ export interface Express3 { (arg1: T1, arg2: T2, arg3: T3): TResult; } /** * express * * @export * @interface Express4 * @template T1 * @template T2 * @template T3 * @template T4 * @template TResult */ export interface Express4 { (arg1: T1, arg2: T2, arg3: T3, arg4: T4): TResult; } /** * express. * * @export * @interface Express5 * @template T1 * @template T2 * @template T3 * @template T4 * @template T5 * @template TResult */ export interface Express5 { (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): TResult; } /** * State of type in ioc. * * @export * @enum {number} */ export declare enum IocState { design = "design", runtime = "runtime", } /** * iterate way. * * @export * @enum {number} */ export declare enum Mode { /** * route up. iterate in parents. */ route = 1, /** * iterate in children. */ children = 2, /** * iterate as tree map. node first */ traverse = 3, /** * iterate as tree map. node last */ traverseLast = 4, }