Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Factory<T>

Standard static-class factory. The token of this factory is a reference to a static class that is instantiated when the factory produces.

Dependency keys are inferred from injection metadata on the constructor's params, as are the injected properties.

example
class A {
    constructor(
        protected readonly myService: MyService
    ) { }
}

const fact = new Factory(A)

fact.produce([myServiceInstance], [])  // => A { myService: myServiceInstance }

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

Properties

Protected Readonly token

token: Instantiable<T>

Methods

getDependencyKeys

getInjectedProperties

match

  • match(something: unknown): boolean

produce

  • produce(dependencies: any[], parameters: any[]): any
Extollo Logo

extollo (v. latin) - to lift up, to elevate

Extollo is a free & libre application framework in TypeScript.