Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClosureFactory<T>

A factory whose token is produced by calling a function.

example
let i = 0
const fact = new ClosureFactory('someName', () => {
    i += 1
    return i * 2
})

fact.produce([], [])  // => 2
fact.produce([], [])  // => 4

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

Properties

Protected Readonly name

name: any

Protected Readonly token

token: () => T

Type declaration

    • (): T
    • Returns T

Methods

getDependencyKeys

getInjectedProperties

match

  • match(something: unknown): boolean

produce

  • produce(): any
Extollo Logo

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

Extollo is a free & libre application framework in TypeScript.