refactor(email): add explicit return types to email send functions (3 of 4)#1561
Merged
jeanduplessis merged 1 commit intomainfrom Mar 26, 2026
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by gpt-5.4-20260305 · 1,011,248 tokens |
tsgo 7.0 enforces TS2883 which requires explicit return type annotations when the inferred type references non-portable vendor types. Add explicit return types to email send functions using the existing SendResult type, and change sendViaMailgun to return Promise<boolean> instead of leaking the mailgun client type through declarations.
7a13ba8 to
2c3cd6d
Compare
pandemicsyn
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR series: 3 of 4 — merge in order: #1559 oxlint → #1560 CI → this PR → #1562 trpc
(This PR is independent of #1559 and #1560 and can merge in parallel with them.)
Add explicit return type annotations to all email send functions for tsgo 7.0 compatibility:
sendOrgSubscriptionEmail) now declarePromise<SendResult>instead of relying on inference fromsend()sendViaMailgunnow returnsPromise<boolean>(true= sent,false= not configured) instead of leaking the mailgun client response typeVerification
scripts/typecheck-all.sh --changes-only— passpnpm format:check— passVisual Changes
N/A
Reviewer Notes
packages/trpcbuild fromtsctotsgo. Without explicit return types, tsgo fails to emit declarations for the email functions.SendResulttype ({ sent: true } | { sent: false; reason: ... }) was introduced by the NeverBounce PR. The wrapper functions previously had no explicit return type, so they inferred the mailgun/CIO vendor types which tsgo rejects.