smart-factory
Version:
functional programming-ready dependancy injector/ioc container library
30 lines (29 loc) • 693 B
TypeScript
export declare class Injectable<T> {
private name;
constructor(name: string);
getName(): string;
}
export declare type Instantiator = (...args: any[]) => Promise<any>;
export declare type Candidate = {
key: string;
deps: string[];
instantiator: Instantiator;
multi?: boolean;
};
export declare type ContainerOptions = {
debug?: boolean;
includes?: string[];
excludes?: string[];
};
export declare type ContainerLogger = {
info: (payload: any) => void;
debug: (payload: any) => void;
};
export declare namespace Dependency {
type Graph = {
vertexes: Vertex[];
edges: Edge[];
};
type Vertex = {};
type Edge = {};
}