import { inspect } from 'node:util'; export declare const symbolSingleton: unique symbol; export type SingletonFactory = () => T; export declare class SymbolDiKey { symbol: symbol; constructor(name: string); [symbolSingleton]?: SingletonFactory; toString(): string; [inspect.custom](): string; } export type ConstructorDiKey = { new (...args: any[]): T; [symbolSingleton]?: SingletonFactory; }; /** * Represents a key for an entry in a DI container. * Class constructors can be used as is. * Multiple keys can be combined into a single key to represent parameterized types. * Composite keys maintain referential equality. * Keys can optionally have a singleton factory attached to them. */ export type DiKey = { new (...args: any[]): T; } | SymbolDiKey; export declare const DiKey: { /** * Needed to ensure referential equality of combined keys. * * This is a multilevel map of maps, where the maps are also used as keys. * * Good luck :) */ "__#50@#combinedRegistry": WeakMap; define(name: string): DiKey; singleton(name: string, factory: SingletonFactory): DiKey; stringify(id: DiKey): string; /** * Create composite keys to represent parameterized types. * * @example DiKey.combine(A, B, C) => "A" * * Maintains referential equality: `DiKey.combine(A, B) === DiKey.combine(A, B)` */ combine(...ids: DiKey[]): any; getSingletonFactory(id: DiKey): SingletonFactory | undefined; "__#50@#lookupCombined"(map: WeakMap, [first, ...rest]: DiKey[]): WeakMap; "__#50@#combinedDescription"([first, ...rest]: DiKey[]): string; }; //# sourceMappingURL=di-key.d.ts.map