##// END OF EJS Templates
tests, refactoring, fixes
tests, refactoring, fixes

File last commit:

r39:ed82314aa5c8 di-typescript
r40:6559c5b81a19 di-typescript
Show More
ValueDescriptor.ts
23 lines | 512 B | video/mp2t | TypeScriptLexer
/ src / ts / di / ValueDescriptor.ts
cin
ported IoC container to typescript...
r34 import { Descriptor } from "./interfaces";
import { ActivationContext } from "./ActivationContext";
cin
ts code cleanup, linting
r39 export class ValueDescriptor implements Descriptor {
_value;
cin
ported IoC container to typescript...
r34
cin
ts code cleanup, linting
r39 constructor(value) {
cin
ported IoC container to typescript...
r34 this._value = value;
}
activate(context: ActivationContext, name: string) {
context.enter(name);
cin
ts code cleanup, linting
r39 const v = this._value;
cin
ported IoC container to typescript...
r34 context.leave();
cin
ts code cleanup, linting
r39 return v;
cin
ported IoC container to typescript...
r34 }
isInstanceCreated(): boolean {
return true;
}
cin
ts code cleanup, linting
r39 getInstance() {
cin
ported IoC container to typescript...
r34 return this._value;
}
cin
ts code cleanup, linting
r39 }