Skip to content

async provider.Function.createAsyncProviders

Sclable CI edited this page Oct 7, 2024 · 7 revisions

@sclable/nestjs-libs / async-provider / createAsyncProviders

Function: createAsyncProviders()

createAsyncProviders<T>(provider, token): Provider[]

Creates an async provider

It returns an array of providers because for the useClass method an additional provider need to be created

Type Parameters

T

type of the object provided by this provider

Parameters

provider: AsyncProvider<T>

an async provider

token: string

token for the provider (use this token with the @Inject(<token>) decorator)

Returns

Provider[]

Defined in

packages/async-provider/index.ts:56

Clone this wiki locally