import type { Diagnostic } from '../edf/errors.js'; import type { EdfFile } from '../edf/reader.js'; export interface AnnotationTimingData { recordStarts: (number | null)[]; malformed: number; /** Unreadable TALs in first position, which carry timing rather than an event. */ malformedTimekeeping?: number; malformedTimekeepingWithText?: number; } /** * The EDF+D warning's promise, withdrawn when the file cannot keep it. * * The header parser raises DISCONTINUOUS with the hint "Each row carries its true recording * time, so gaps stay visible instead of being closed" — which is what an EDF+D conversion * does, when the record times can be read. When they cannot, the very next warning in the * same run says the opposite: "Times are written as if the records were contiguous. Any gaps * are lost." Two warnings, printed together, and the second denies the first. * * The parser cannot know: whether the starts can be derived is settled here, after the * annotation channel has been read. So the hint is amended where the answer is, the same way * `withoutFileRateWarning` drops a header diagnostic the plan has superseded. */ export declare function withTimingPromiseKept(diagnostics: readonly Diagnostic[], derived: boolean): Diagnostic[]; /** * Resolve the true start time of every data record. * * Continuous recordings need no table because their record positions are * arithmetic. EDF+D recordings carry their positions in the annotation channel; * missing or malformed timekeeping entries are reported before falling back. */ export declare function deriveRecordStarts(file: EdfFile, annotationData: AnnotationTimingData): { starts: Float64Array | null; diagnostics: Diagnostic[]; };