Skip to content

injectMany

@tsed/di

Usage

typescript
import { injectMany } from "@tsed/di";

See /packages/di/src/types/common/fn/injectMany.ts.

Overview

ts
function injectMany<T>(token: string | symbol, opts?: Partial<Pick<InvokeOptions, "useOpts" | "rebuild" | "locals">>): T[];
  • token (string | symbol): - The injection token to resolve

  • opts (Partial<Pick<InvokeOptions): Optional. - configuration for the injection

  • opts.useOpts (``): - Options for instance creation

  • opts.rebuild (``): - Whether to rebuild the instance

  • opts.locals (``): - Local container overrides

Description

Injects multiple instances of a given token using the injector service.

Released under the MIT License.