FactoryTokenProvider
@tsed/di
Usage
typescript
import { FactoryTokenProvider } from "@tsed/di/src/types/common/interfaces/TokenProvider";
See /packages/di/src/types/common/interfaces/TokenProvider.ts.
Overview
ts
type FactoryTokenProvider<T = any> = T & {
readonly __type: "token_factory";
};
Description
A token is a unique identifier for a provider in the dependency injection system. It solves the inference problem when using inject()
function.
readonly __type
ts
readonly __type: "token_factory";