Interface InjectableClass<T>

A class constructor with a binding that determines how to resolve it as a DependencyKey.Of<T>.

Example

 class MyClass1 {
constructor(x: number, y: string) {}
static inject = Inject.construct(this, NumberKey, StringKey)
}

class MyClass2 {
static inject = Inject.construct(MyClass3, NumberKey, StringKey, BooleanKey)
}

class MyClass3 extends MyClass2 {
constructor(x: number, y: string, z: boolean) {
super()
}
}

Type Parameters

  • T = any

Hierarchy

  • Class<T>
    • InjectableClass

Constructors

Properties

Constructors

  • Parameters

    • Rest ..._args: any[]

    Returns PrivateConstructClass

Properties

inject?: ComputedKey<T, any, any, any, any> | (() => ComputedKey<T, any, any, any, any>)

A ComputedKey that, if provided, specifies how to resolve this class if no provider was supplied.

Type declaration

prototype: T
scope?: ScopeList | (() => ScopeList)

A Scope or ScopeList that, if provided, specifies the scope in which an instance of this class will be resolved and stored.

Type declaration

Generated using TypeDoc