/** * @packageDocumentation * * Internal helpers for caching flattened DTIF tokens alongside the original * token documents. This allows synchronous consumers such as flatten helpers * to reuse async parse results gathered during configuration loading without * reparsing the DTIF payload. */ import type { DesignTokens, DtifFlattenedToken } from '../../core/types.js'; /** * Attach flattened DTIF tokens to a token document for later reuse. * * The flattened tokens are stored on a non-enumerable symbol property so they * do not interfere with JSON serialisation or metadata inspection. */ export declare function attachDtifFlattenedTokens(target: object, tokens: readonly DtifFlattenedToken[]): void; /** * Retrieve previously attached flattened DTIF tokens from a token document. */ export declare function getDtifFlattenedTokens(target: unknown): readonly DtifFlattenedToken[] | undefined; export interface EnsureDtifOptions { uri?: string; } /** * Parse and attach flattened DTIF tokens to a document when none are cached. */ export declare function ensureDtifFlattenedTokens(document: DesignTokens, options?: EnsureDtifOptions): Promise; //# sourceMappingURL=dtif-cache.d.ts.map