/** * Strictly-validated RFC 5322 / RFC 6532 (SMTPUTF8) address primitive. * Use at system boundaries (user input, API payloads) to reject * malformed addresses before they reach a driver. * * @module */ import type { EmailAddress, EmailAddressInput, Result } from "./types.mjs"; /** Opaque tag — callers can rely on `Address.parse` returning a * validated instance instead of re-validating. */ declare const VALIDATED: unique symbol; export interface Address extends EmailAddress { readonly [VALIDATED]: true; readonly local: string; readonly domain: string; toString: () => string; } /** Validate + parse an input string or `EmailAddress`. Returns a * `Result
` so callers can pattern-match instead of * try/catch. SMTPUTF8 allowed when `smtpUtf8` is true (default). */ export declare function parseAddress(input: string | EmailAddress, options?: { smtpUtf8?: boolean; }): Result; /** Convenience: throw on failure. Use only when you're certain the * input is validated elsewhere. */ export declare function mustParseAddress(input: string | EmailAddress, options?: { smtpUtf8?: boolean; }): Address; /** Parse any of the shapes accepted by `EmailAddressInput` into an * array of validated `Address`es, short-circuiting on the first * failure. */ export declare function parseAddresses(input: EmailAddressInput, options?: { smtpUtf8?: boolean; }): Result; export {};