From 7b8da914e6c4b3c23a3e49fbb0f15103f7285d94 Mon Sep 17 00:00:00 2001 From: Shammah Chancellor Date: Sat, 12 Nov 2022 08:34:41 -0800 Subject: [PATCH] fix: properly require 1 element in `MailDataRequired` type Current type does not work with the latest versions of typescript. This updates the type so it remains an array, and not the intersection of an object and an array. --- packages/helpers/classes/mail.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/helpers/classes/mail.d.ts b/packages/helpers/classes/mail.d.ts index ac0ced806..26a5754de 100644 --- a/packages/helpers/classes/mail.d.ts +++ b/packages/helpers/classes/mail.d.ts @@ -169,7 +169,7 @@ export interface MailData { } export type MailDataRequired = MailData & ( - { text: string } | { html: string } | { templateId: string } | { content: MailContent[] & { 0: MailContent } }); + { text: string } | { html: string } | { templateId: string } | { content: [MailContent, ...MailContent[]][] }); export interface MailJSON { from: EmailJSON;