Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Container<TServiceMap>

Container interface.

Type parameters

Hierarchy

  • Container

Index

Properties

Methods

Properties

keys

keys: ContainerKey[]

Get all keys defined in the container.

Methods

get

  • Get a service from the container.

    Type parameters

    • TKey: string | number | symbol = keyof TServiceMap

      The type of the container key of the service to get.

    Parameters

    • key: TKey

      The container key of the service to get.

    Returns ServiceTypeOf<TServiceMap, TKey>

has

  • has<TKey>(key: TKey): this is Container<{ [ k in string | number | symbol]: ServiceTypeOf<TServiceMap, TKey> }>
  • Check if a container key is defined in the container.

    Type parameters

    • TKey: string | number | symbol = keyof TServiceMap

      The container key of the service to check.

    Parameters

    • key: TKey

      The container key of the service to check.

    Returns this is Container<{ [ k in string | number | symbol]: ServiceTypeOf<TServiceMap, TKey> }>

Generated using TypeDoc