##// END OF EJS Templates
dependency builder proposal
dependency builder proposal

File last commit:

r108:0d76488aa00a ioc ts support
r108:0d76488aa00a ioc ts support
Show More
Box.ts
23 lines | 465 B | video/mp2t | TypeScriptLexer
cin
dependency builder proposal
r108 import { Builder } from "../di/Annotations";
import { Bar } from "./Bar";
import { Foo } from "./Foo";
cin
Initial work on typescript support for the container configuration
r107
export interface Injector<T> {
setValue(value: T);
}
cin
dependency builder proposal
r108 const builder = new Builder<Box<any>, { bar: Bar; foo: Foo}>();
@builder.provides("barBox")
cin
Initial work on typescript support for the container configuration
r107 export class Box<T> implements Injector<T> {
private _value: T;
cin
dependency builder proposal
r108 @builder.inject("bar")
cin
Initial work on typescript support for the container configuration
r107 setValue(value: T) {
this._value = value;
}
getValue() {
return this._value;
}
}