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

Type Alias: NamespacedServices<N, T> ​

NamespacedServices<N, T> = { [P in N]: Namespace } & { [K in keyof T as K extends string | number ? `${N}.${K}` : never]: T[K] }

Defined in: src/types.ts:489

Services added under a namespace: Name (a Namespace; get('Name') returns its provider) and Name.key for each service.

Type Parameters ​

N ​

N extends string

T ​

T

Example ​

ts
type Billing = NamespacedServices<'Billing', { currency: string }>;
// { Billing: Namespace } & { 'Billing.currency': string }

Released under the MIT License.