##// END OF EJS Templates
sync
sync

File last commit:

r115:691199f665e0 ioc ts support
r116:e81085d00fcb ioc ts support
Show More
Box.ts
35 lines | 714 B | video/mp2t | TypeScriptLexer
cin
corrected code to support ts strict mode...
r115 // import { services } from "../di/Annotations";
// import { Bar } from "./Bar";
cin
Initial work on typescript support for the container configuration
r107
cin
working on IoC configuration
r114 // declare required dependencies
cin
corrected code to support ts strict mode...
r115 // const config = services<{
// bar: Bar;
// }>();
cin
working on IoC configuration
r114
// export service descriptor
cin
corrected code to support ts strict mode...
r115 // export const service = config.build<Box<Bar>>();
cin
Initial work on typescript support for the container configuration
r107
cin
corrected code to support ts strict mode...
r115 // @service.consume(config.dependency("bar"))
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
corrected code to support ts strict mode...
r115 // @service.inject("bar")
cin
Initial work on typescript support for the container configuration
r107 setValue(value: T) {
this._value = value;
}
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 IoC configuration
r114 }