/** * For the purposes of this module, an "email address" refers to the Mailbox * definition in RFS 5321 section 4.1.2, and NOT to the addr-spec definition * found in RFS 5322 section 3.4.1, of which Mailbox appears to be a subset. * * Ignored by this module is the definition of a "valid email address" given in * the HTML Living Standard, which address is (mostly) a subset of Mailbox. * https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address * * Mailbox is further extended by RFC 6531 (SMTP Extension for * Internationalized Email) section 3.3 Extended Mailbox Address Syntax to add * support of non-ASCII characters. */ /** * Type of Mailbox. Flags for buildPattern() and validate() functions. */ export declare const enum MailboxType { /** * RFC 5321 Mailbox address. * Does NOT allow quoted string local parts, address literals, * or local domains by default. See STRICT flag. */ RFC5321 = 0, /** * RFC 6531 Extended Mailbox Address (SMTPUTF8 address). * Supports Unicode characters. * Does NOT allow quoted string local parts, address literals, * or local domains by default. See STRICT flag. */ RFC6531 = 1, /** * Alias to RFC6531. */ SMTPUTF8 = 1, /** * Add flag to RFC5321 or RFC6531 to allow quoted strings in local part. */ ALLOW_QUOTED_STRING = 2, /** * Add flag to RFC5321 or RFC6531 to allow address literals. */ ALLOW_ADDRESS_LITERAL = 4, /** * Add flag to RFC5321 or RFC6531 to allow local domains. */ ALLOW_LOCAL_DOMAIN = 8, /** * Add flag to RFC5321 or RFC6531 for strict interpretation. * (ALLOW_QUOTED_STRING | ALLOW_ADDRESS_LITERAL | ALLOW_LOCAL_DOMAIN) */ STRICT = 14 } /** * True if this environment supports the unicode ('u') flag for RegExp. * * **Gotcha**: When using in the browser, ensure that the `