import type { DriverFactory, EmailDriver } from "../types.mjs"; /** Fan-out meta driver: every send goes to **all** listed drivers. * * The first driver is authoritative — its result is returned and any * failure propagates. The rest are "mirror" drivers used for * auditing/archival; their failures are swallowed (reported via * \`onMirrorError\`) so they never cause the user-facing send to fail. * * ```ts * createEmail({ driver: tee({ drivers: [resendPrimary, sesArchive] }) }) * ``` */ export interface TeeOptions { drivers: ReadonlyArray; /** Called whenever a non-primary (mirror) driver errors — typical use * is logging to Sentry/OTel. */ onMirrorError?: (driverName: string, error: Error) => void; /** Await mirror sends before resolving. Default: false — mirrors run * fire-and-forget so the user doesn't wait on their tail latency. */ awaitMirrors?: boolean; } declare const tee: DriverFactory; export default tee;