##// END OF EJS Templates
working on di decorators
working on di decorators

File last commit:

r109:f71c50acc9f9 ioc ts support
r109:f71c50acc9f9 ioc ts support
Show More
Bar.ts
18 lines | 344 B | video/mp2t | TypeScriptLexer
import { Foo } from "./Foo";
export class Bar {
name = "bar";
foo: Foo | undefined;
constructor(_opts?: { foo?: Foo; }) {
if (_opts && _opts.foo)
this.foo = _opts.foo;
}
getFoo() {
if (this.foo === undefined)
throw new Error("The foo isn't set");
return this.foo;
}
}