##// 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
import { config } from "./config";
const service = config.service("barBox");
@service.provides()
export class Box<T> {
private _value: T | undefined;
constructor(value: T) {
this._value = value;
}
@service.inject("bar")
setValue(value: T) {
this._value = value;
}
@service.inject("foo")
setObj(value: object) {
}
getValue() {
if (this._value === undefined)
throw new Error("Trying to get a value from the empty box");
return this._value;
}
}