From b434861c242295516bc54c45c6c5e37852e75a41 Mon Sep 17 00:00:00 2001 From: Amo Wu Date: Fri, 7 Mar 2025 14:35:52 +0800 Subject: [PATCH] feat(types): add addCustomDomains type definition Add missing type definition for the addCustomDomains method in Mailchecker. This improves type safety and ensures that users can benefit from full autocomplete support when using custom domains. --- types.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/types.d.ts b/types.d.ts index 67ee3a5f..d6fcaf0f 100644 --- a/types.d.ts +++ b/types.d.ts @@ -1,2 +1,12 @@ export function isValid(email: string): boolean export function blacklist(): Set +/** + * Adds custom domains to the Mailchecker module. + * + * This function enhances the default email validation behavior by allowing you to extend + * the recognized list of email domains. The provided custom domains will be checked alongside + * the built-in domains. + * + * @param domains - An array of custom domain strings to be added. + */ +export function addCustomDomains(domains: string[]): void