import { Builder } from "../di/Annotations"; import { Bar } from "./Bar"; import { Foo } from "./Foo"; export interface Injector { setValue(value: T); } const builder = new Builder, { bar: Bar; foo: Foo}>(); @builder.provides("barBox") export class Box implements Injector { private _value: T; @builder.inject("bar") setValue(value: T) { this._value = value; } getValue() { return this._value; } }