Options
All
  • Public
  • Public/Protected
  • All
Menu

Service options passed to the @Service() decorator. Allows to specify service id and/or factory used to create this service.

Type parameters

  • T

  • K: keyof T

Hierarchy

  • ServiceOptions

Index

Properties

Optional factory

factory: [ObjectType<T>, K] | function

Factory used to produce this service.

Optional global

global: boolean

Indicates if this service must be global and same instance must be used across all containers.

Optional id

id: string | Token<any>

Unique service id.

Optional init

init: boolean

Represents wheather or not this particular container should be resolved on start

Optional multiple

multiple: boolean

Allows to setup multiple instances the different classes under a single service id string or token.

Optional transient

transient: boolean

Indicates if instance of this class must be created on each its request. Global option is ignored when this option is used.

Generated using TypeDoc