Skip to content

DI Bag API / index / Reach

Type Alias: Reach ​

ts
type Reach = {
    readonly kind: 'export' | 'external';
    readonly key: PropertyKey;
} | {
    readonly kind: 'collection';
    readonly key: symbol;
} | {
    readonly kind: 'scoped';
    readonly key: PropertyKey;
};

Defined in: lifetime-types.ts:15

Where a sealed lifetime walk leaves its module: an export or external name the installing host resolves, a typed-token collection the host completes, or a private scoped dead end.

See ​

https://dany-fedorov.github.io/di-bag/agent/errors.html#singleton-captures-scoped

Ordinary services. Checked composition. Explicit ownership.