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

File last commit:

r110:cc196cedcf24 ioc ts support
r110:cc196cedcf24 ioc ts support
Show More
Box.ts
28 lines | 537 B | video/mp2t | TypeScriptLexer
cin
dependency builder proposal
r110 import { config } from "./config";
cin
Initial work on typescript support for the container configuration
r107
cin
dependency builder proposal
r110 const service = config.service("barBox");
cin
Initial work on typescript support for the container configuration
r107
cin
dependency builder proposal
r110 @service.provides()
cin
working on di decorators
r109 export class Box<T> {
private _value: T | undefined;
cin
dependency builder proposal
r108
cin
working on di decorators
r109 constructor(value: T) {
this._value = value;
}
cin
Initial work on typescript support for the container configuration
r107
cin
dependency builder proposal
r110 @service.inject("bar")
cin
Initial work on typescript support for the container configuration
r107 setValue(value: T) {
this._value = value;
}
cin
dependency builder proposal
r110 @service.inject("foo")
cin
working on di decorators
r109 setObj(value: object) {
}
cin
Initial work on typescript support for the container configuration
r107 getValue() {
cin
working on di decorators
r109 if (this._value === undefined)
throw new Error("Trying to get a value from the empty box");
cin
Initial work on typescript support for the container configuration
r107 return this._value;
}
cin
working on di decorators
r109 }