/** * Token factory for creating type-safe DI tokens with configurable prefix. * * @example * ```typescript * // Create a factory with custom prefix * const tokens = createTokenFactory({ prefix: 'MyApp' }); * * // Create globally shared tokens (safe across multiple module instances) * const serviceToken = tokens.type('UserService'); * // => Symbol.for('MyApp:type:UserService') * * const metaToken = tokens.meta('config'); * // => Symbol.for('MyApp:meta:config') * ``` */ export interface TokenFactoryOptions { /** * Prefix for generated token symbols. * @default 'DI' */ prefix?: string; } export interface TokenFactory { /** * Create a type token for a service/provider. * @param name - The name of the type * @returns A unique symbol for the type */ type: (name: string) => symbol; /** * Create a metadata token for storing/retrieving metadata. * @param name - The name of the metadata key * @returns A unique symbol for the metadata key */ meta: (name: string) => symbol; } /** * Create a token factory with the given options. * * @param options - Factory configuration * @returns A token factory instance * * @example * ```typescript * const tokens = createTokenFactory({ prefix: 'FrontMcp' }); * const userToken = tokens.type('UserService'); * ``` */ export declare function createTokenFactory(options?: TokenFactoryOptions): TokenFactory; /** * Default token factory instance with 'DI' prefix. * Use this for standalone DI usage without custom branding. */ export declare const DiTokens: TokenFactory;