##// END OF EJS Templates
configuration draft-1
configuration draft-1

File last commit:

r118:6738ac4c3072 ioc ts support
r119:86e3aa3c3eea ioc ts support
Show More
interfaces.ts
21 lines | 644 B | video/mp2t | TypeScriptLexer
/ src / main / ts / di / interfaces.ts
cin
changed the project structure
r49 import { ActivationContext } from "./ActivationContext";
cin
corrected code to support ts strict mode...
r115 export interface Descriptor<S = any, T = any> {
activate(context: ActivationContext<S>): T;
cin
changed the project structure
r49 }
cin
configuration interfaces moved to di/Configuration module...
r118 export type ServiceMap<S> = {
[k in keyof S]: Descriptor<S, S[k]>;
cin
corrected code to support ts strict mode...
r115 };
cin
configuration interfaces moved to di/Configuration module...
r118 export type PartialServiceMap<S> = {
[k in keyof S]?: Descriptor<S, S[k]>;
};
cin
corrected code to support ts strict mode...
r115
export interface Resolver<S> {
resolve<K extends keyof ContainerServices<S>, T extends ContainerServices<S>[K] = ContainerServices<S>[K]>(name: K, def?: T): T;
}
export type ContainerServices<S> = S & {
container: Resolver<S>;
};
cin
configuration interfaces moved to di/Configuration module...
r118 export type ActivationType = "singleton" | "container" | "hierarchy" | "context" | "call";