export interface TokenValue { /** * @description Token type. */ __t: T; /** * @description Description of token. */ __d: string; /** * @description Unique symbol. */ __s: symbol; /** * @description Is binding by token optional. */ __o: boolean; } export interface RequiredToken extends TokenValue { __o: false; } export interface OptionalToken extends TokenValue { __o: true; } export interface Token extends RequiredToken { optional: OptionalToken; } export declare type TokenType = T extends RequiredToken ? T['__t'] : T['__t'] | undefined; export declare type TokenTypeMap = { [K in keyof T]: T[K] extends Token ? TokenType : TokenTypeMap; }; export declare type ToToken = undefined extends T ? OptionalToken> : RequiredToken; /** * @description * Creates a unique token with the type. * * @param {string} description - a description of the token to be used in logs and error messages. * @returns a unique `Token` token with the type. * * @link https://brandi.js.org/reference/pointers-and-registrators#tokentdescription */ export declare const token: (description: string) => Token;