import { Parts } from './reading.js'; /** Version of the deep id definition, independent of the core's. Deep ids compare only within one version. */ export declare const DEEP_VERSION: number; export interface DeepReading { /** Version of the deep id definition. */ v: number; /** 64 hex characters (SHA-256 of the text in docs/SIGNALS.md), or null when a part failed, timed out, showed noise, or none holds a value. */ id: string | null; /** * Parts: `r.cg` and `r.audio`, each 16 hex digits or a status (`!na`, `!err`, `!to`, `!ex`, `!noise`); `r.ct` is always `!ex`, the * text scene is not read. Hints, never hashed: * `r.cchk` and `r.achk`, the check that decided each read, and `x.rule`, the rule that excluded the reads ('' when none did). */ c: Parts; flags: { /** Parts that failed or timed out. */ partial: string[]; /** Parts whose alteration check fired: what the browser returned was not what was drawn or rendered. */ noise: string[]; /** Parts this browser's rule leaves out. */ excluded: string[]; /** An id was built, but some part is excluded or missing in this browser. */ weak: boolean; }; /** Milliseconds the page was kept busy, in total. */ ms: number; /** Milliseconds per step. */ t: { [step: string]: number; }; } type Callback = (reading: DeepReading | null) => void; /** * Starts the reads on the first call, never at import or load. Calls back once per call, after returning, with the same reading * for every caller, or with null in a frame, outside a browser, or without Object.keys or Date.now. Never throws. The answer and the * 30 s watchdog go through the page's own timers: a page whose setTimeout and MessageChannel both throw can be answered before get() * returns, and one whose setTimeout silently drops what it is given may never be answered. */ export declare function get(callback: Callback): void; export {};