import { InjectionTokenType } from "../../token/injection-token.mjs"; import { InjectableScope } from "../../enums/injectable-scope.enum.mjs"; //#region src/internal/core/name-resolver.d.mts /** * Handles instance name generation with support for requestId and scope. * * Generates unique instance identifiers based on token, arguments, and scope. * Request-scoped services MUST include requestId in their name for proper isolation. */ declare class NameResolver { private readonly logger; private readonly instanceNameCache; constructor(logger?: Console | null); /** * Generates a unique instance name based on token, arguments, requestId, and scope. * * Name formats: * - Singleton/Transient without args: `${tokenId}` * - Singleton/Transient with args: `${tokenId}:${argsHash}` * - Request without args: `${tokenId}:requestId=${requestId}` * - Request with args: `${tokenId}:requestId=${requestId}:${argsHash}` * * @param token The injection token * @param args Optional arguments * @param requestId Optional request ID (required for request-scoped services) * @param scope Optional scope (used to determine if requestId should be included) * @returns The generated instance name */ generateInstanceName(token: InjectionTokenType, args?: any, requestId?: string, scope?: InjectableScope): string; /** * Upgrades an existing instance name to include requestId. * Preserves any args hash that might already be in the name. * * Examples: * - `TokenName` → `TokenName:requestId=req-123` * - `TokenName:abc123` → `TokenName:requestId=req-123:abc123` * * @param existingName The existing instance name (without requestId) * @param requestId The request ID to add * @returns The upgraded instance name with requestId */ upgradeInstanceNameToRequest(existingName: string, requestId: string): string; /** * Formats a single argument value for instance name generation. */ formatArgValue(value: any): string; } //#endregion export { NameResolver }; //# sourceMappingURL=name-resolver.d.mts.map