/** * Shared contract between the {@link module-timer} preload and {@link logger}'s * timing tree. Kept in its own dependency-free module so the preload can import * it without pulling in winston (via logger) and the logger can drain the buffer * without importing the Bun-plugin preload. */ export interface ModuleLoadEvent { /** Absolute or Bun-resolved module path. */ path: string; /** `performance.now()` timestamp captured at Bun `onLoad` entry. */ start: number; /** Inclusive module window: `onLoad` entry → appended final marker. */ durationMs: number; /** Own top-level body / TLA time: prepended body marker → appended final marker. */ bodyMs?: number; /** Resolved static children imported by this module. */ imports: string[]; } /** The append-only buffer the preload pushes into (created on first access). */ export declare function moduleLoadBuffer(): ModuleLoadEvent[]; /** Drain and return all buffered events, leaving the buffer empty. */ export declare function drainModuleLoadEvents(): ModuleLoadEvent[];