Skip to content

Commit

Permalink
[types] Add missing reply fn to ForwardableEmailMessage
Browse files Browse the repository at this point in the history
The `ForwardableEmailMessage` interface should expose a
`reply` function, but it currently doesn't.This commit adds
the missing function to the interface definition.

Please refer to https://developers.cloudflare.com/email-routing/email-workers/runtime-api/#emailmessage-definition

Fixes #2283
  • Loading branch information
CarmenPopoviciu committed Jul 19, 2024
1 parent 98b7ed1 commit a6e0864
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions types/defines/email.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ interface ForwardableEmailMessage extends EmailMessage {
* @returns A promise that resolves when the email message is forwarded.
*/
forward(rcptTo: string, headers?: Headers): Promise<void>;
/**
* Reply to the sender of this email message with a new EmailMessage object.
* @param message The reply message.
* @returns A promise that resolves when the email message is replied.
*/
reply(message: EmailMessage): Promise<void>;
}

/**
Expand Down

0 comments on commit a6e0864

Please sign in to comment.