Documents injecute 1.x · Migrating from 0.x
Skip to content

Type Alias: RegistryServices<S, A> ​

RegistryServices<S, A> = [keyof S] extends [never] ? A : S & A

Defined in: src/types.ts:505

The services a registry resolves: the ones it was given (S) and the ones it added (A). A container is a registry that was given nothing, so its services are just A.

Type Parameters ​

S ​

S

A ​

A

Example ​

ts
type Billing = RegistryServices<{ db: Database }, { invoices: InvoiceRepository }>;
// { db: Database } & { invoices: InvoiceRepository }

Released under the MIT License.