Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "container"

Index

Type aliases

ContainedType

ContainedType: object | Function

Variables

Const defaultContainer

defaultContainer: ContainerInterface = new (class implements ContainerInterface {private instances: { type: Function, object: any }[] = [];get<T>(someClass: ContainedType<T>): T {let instance = this.instances.find(i => i.type === someClass);if (!instance) {instance = { type: someClass, object: new (someClass as new() => T)()};this.instances.push(instance);}return instance.object;}})()

Container to be used by this library for inversion control. If container was not implicitly set then by default container simply creates a new instance of the given class.

Let userContainer

userContainer: ContainerInterface

Let userContainerOptions

userContainerOptions: UseContainerOptions | undefined

Functions

getFromContainer

  • Gets the IOC container used by this library.

    Type parameters

    • T

    Parameters

    Returns T

useContainer

Generated using TypeDoc