//#region src/internal/json-safe.d.ts
type JsonValue = null | boolean | number | string | JsonValue[] | {
  [key: string]: JsonValue;
};
//#endregion
//#region src/error-reporter.d.ts
interface ErrorReportError {
  name: string;
  message: string;
  stack?: string;
  cause?: JsonValue;
  value?: JsonValue;
}
interface ErrorReportEvent {
  timestamp: string;
  error: ErrorReportError;
  context: Record<string, JsonValue>;
}
interface ErrorReporterTransport {
  send(event: ErrorReportEvent): void | Promise<void>;
}
type ErrorReportResult = {
  ok: true;
} | {
  ok: false;
  transportError: unknown;
};
interface ErrorReporter {
  report(error: unknown, context?: Readonly<Record<string, unknown>>): Promise<ErrorReportResult>;
}
interface ErrorReporterOptions {
  transport: ErrorReporterTransport;
  context?: Readonly<Record<string, unknown>>;
  now?: () => Date;
}
declare function createErrorReporter(options: ErrorReporterOptions): ErrorReporter;
//#endregion
export { ErrorReporterOptions as a, JsonValue as c, ErrorReporter as i, ErrorReportEvent as n, ErrorReporterTransport as o, ErrorReportResult as r, createErrorReporter as s, ErrorReportError as t };