Skip to content

lazyInject

@tsed/di

Usage

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

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

Overview

ts
function lazyInject<Token>(factory: () => Promise<{
    default: TokenProvider<Token>;
}>): Promise<Token>;

Description

Lazy load a provider from his package and invoke only when the provider is used.

default

ts
default: TokenProvider<Token>;

Released under the MIT License.