class ProviderRegistry
Since 0.1.0

Token-keyed store of provider entries with optional parent inheritance.

Registration always targets the local map — a child never mutates its parent. Lookup walks the parent chain so a scoped container resolves everything the root registered.

Constructors

ProviderRegistry(parent?: ProviderRegistry)
Parameters
optional
parent: ProviderRegistry

Optional parent registry for inherited lookups.

Methods

Creates a child registry that inherits lookups from this one.

get(token: string): ProviderEntry | undefined

Looks up a provider entry, walking the parent chain.

has(token: string): boolean

Reports whether a token is registered anywhere in this chain.

register(
token: string,
entry: ProviderEntry
): void

Registers a provider entry under a token.

Usage

import { ProviderRegistry } from "di-plugin/src/index.ts";