##// END OF EJS Templates
sync
sync

File last commit:

r121:876264d00a17 ioc ts support
r123:264497557e79 ioc ts support
Show More
Bar.ts
35 lines | 660 B | video/mp2t | TypeScriptLexer
cin
tests moved under src/ folder...
r50 import { Foo } from "./Foo";
cin
configuration draft-1
r119 import { define, dependency } from "./services";
cin
tests moved under src/ folder...
r50
cin
configuration draft-1
r119 export const service = define<Bar>();
cin
tests moved under src/ folder...
r50
cin
configuration draft-1
r119 @service.declare({
foo: dependency("foo"),
cin
configuration interfaces moved to di/Configuration module...
r118 nested: {
cin
sync
r121 lazy: dependency("foo", { lazy: true })
},
host: "value"
cin
configuration interfaces moved to di/Configuration module...
r118 })
cin
Working on IoC container configuration
r111 export class Bar {
barName = "bar";
cin
tests moved under src/ folder...
r50
cin
Working on IoC container configuration
r111 _v: Foo | undefined;
cin
configuration interfaces moved to di/Configuration module...
r118 constructor(_opts?: {
foo?: Foo;
nested?: {
cin
Working on IoC container configuration
r111 lazy: () => Foo
cin
sync
r121 },
host: string
cin
Working on IoC container configuration
r111 }) {
cin
corrected code to support ts strict mode...
r115 if (_opts && _opts.foo)
this._v = _opts.foo;
cin
tests moved under src/ folder...
r50 }
cin
working on di decorators
r109
getFoo() {
cin
Working on IoC container configuration
r111 if (this._v === undefined)
cin
working on di decorators
r109 throw new Error("The foo isn't set");
cin
Working on IoC container configuration
r111 return this._v;
cin
working on di decorators
r109 }
cin
tests moved under src/ folder...
r50 }