type MeasurementContext = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D; /** Internal cache shared by Element.measureText() and Element.measureWidth(). */ export declare class TextMetricsCache { private static readonly maxEntries; private static readonly maxKeyLength; private static entries; private static context?; private static fonts?; private static fontCount?; private static fontStatus?; private static readonly onFontsChanged; /** Also used by Metrics.clear() and explicit canvas/font replacement. */ static clear(): void; /** Track document/worker fonts without retaining listeners on a replaced document. */ private static fontsReady; /** Preserve all TextMetrics fields, which are prototype getters in browsers. */ private static snapshot; /** Key shaping and bounds settings as well as font/text; never cache fallback during loading. */ static measure(context: MeasurementContext, text: string): Readonly; } export {};