Skip to content

Commit

Permalink
Merge pull request #418 from SPARTAN563/fix/417-update-index-ts
Browse files Browse the repository at this point in the history
fix: Update TypeScript definition to correct callback arguments for API
  • Loading branch information
thinkingserious authored Aug 14, 2017
2 parents 2079172 + c2a03cd commit 8a2436d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
declare namespace SendGrid.Helpers.Error {
export interface SendGridError extends Error {

}
}

declare namespace SendGrid.Helpers.Mail {
export interface Helper {
Email: typeof Email;
Expand Down Expand Up @@ -465,7 +471,7 @@ declare namespace SendGrid {

emptyRequest(data?: SendGrid.Rest.Request): SendGrid.Rest.Request;

API(request: SendGrid.Rest.Request, callback: (response: SendGrid.Rest.Response) => void): void;
API(request: SendGrid.Rest.Request, callback: (err: SendGrid.Helpers.Error.SendGridError, response: SendGrid.Rest.Response) => void): void;
API(request: SendGrid.Rest.Request): Promise<SendGrid.Rest.Response>;
}
}
Expand Down

0 comments on commit 8a2436d

Please sign in to comment.