import { ProfilerOnRenderCallback } from "react"; //#region src/web/lib/uiTrace.d.ts export interface UiTraceRecord { event: 'ui.store_updates' | 'ui.renders'; level: 'info' | 'warn'; attributes: Record; } export type UiTraceSink = (records: UiTraceRecord[]) => void; /** Counts one store change and the state paths it touched. */ export declare function noteStoreUpdate(name: string, previous: unknown, next: unknown): void; interface TraceableStore { readonly state: unknown; subscribe(listener: (value: unknown) => void): unknown; } /** Reports every change of `store` under `name`; returns the store so it can wrap the constructor. */ export declare function traceStore(name: string, store: S): S; /** Counts one render of `name`; `ms` is its duration when known. */ export declare function noteRender(name: string, ms?: number): void; /** * Counts the renders of the calling component, and times render start to layout effect, which * includes its children. Works in production builds, unlike ``. */ export declare function useRenderTrace(name: string): void; /** * `` for subtrees the host does not own, such as template screens. React calls * it only in development and profiling builds. */ export declare const traceProfilerRender: ProfilerOnRenderCallback; /** Hands the current window to the sink and starts the next one. Exported for tests. */ export declare function flushUiTrace(now?: number): void; /** Starts the rollups and sends each window to `next`; `undefined` stops them. */ export declare function setUiTraceSink(next: UiTraceSink | undefined): void; //#endregion export {}; //# sourceMappingURL=uiTrace.d.mts.map