12345678910111213141516171819202122232425262728293031 |
- import { Inject, Singleton } from "../../src/Decorator"
- import { COMPONENT_C_VALUE } from "../CONSTANTS"
- import { ComponentA } from "./ComponentA"
-
- export class benis{
-
- }
-
- export abstract class IComponentC{
- getFromA: () => string
- getFromThis: () => string
- }
-
- @Singleton({
- interface: IComponentC,
- })
- export class ComponentC{
-
- @Inject(ComponentA)
- private componentA: ComponentA
-
- private value: string = COMPONENT_C_VALUE
-
- getFromA(): string {
- return this.componentA.getFromThis()
- }
-
- getFromThis(): string {
- return this.value
- }
- }
|