import { Inject, Singleton } from "../../src/Decorator" import { COMPONENT_B_VALUE } from "../CONSTANTS" import { ComponentA } from "./ComponentA" export abstract class IComponentB{ getFromA: () => string getFromThis: () => string } @Singleton(IComponentB) export class ComponentB implements IComponentB{ @Inject(ComponentA) private componentA: ComponentA private value: string getFromA(): string { return this.componentA.getFromThis() } getFromThis(): string { return this.value } initialize(): void{ this.value = COMPONENT_B_VALUE } }