Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ declare namespace SendGrid {
export interface SendGridConstructor {
(apiKey: string, host?: string, globalHeaders?: { [header: string]: string; }): SendGrid;
constructor(apiKey: string, host?: string, globalHeaders?: { [header: string]: string; }): SendGrid;

mail: SendGrid.Helpers.Mail.Helper;
}

export class SendGrid {
Expand All @@ -467,6 +469,5 @@ declare namespace SendGrid {
}
}

declare const mail: SendGrid.Helpers.Mail.Helper;
declare const sendGrid: SendGrid.SendGridConstructor;
export {mail, sendGrid as SendGrid};
export = sendGrid;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking this would be a breaking change. SendGrid is the expected case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is certainly a breaking change when it comes to the definition, however it corrects the definition to match the actual behaviour of the SendGrid JS library.

I've updated the interface above to include the rest of the library's exports as expected.