-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Correct TypeScript definitions #300
fix: Correct TypeScript definitions #300
Conversation
See sendgrid#251 and <notheotherben/sendgrid-ts-demo#1> for more details on what wasn't working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain how these changes fix the TypeScript definitions?
Thanks!
export = sendGrid; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thanks for the quick turnaround on the fix! I just had a few points of clarification in the review. We should be able to merge this one quickly. |
Could you please add an example using TypeScript in NodeJS ? |
Hey, Sorry to comment on a closed PR, but doesn't |
Yeah, you're correct - sorry I missed that, let me quickly throw together a new PR |
Fixes an issue raised in sendgrid#300
I forked this and made a couple other changes to the definition: https://github.com/bloomtri/sendgrid-nodejs The callback for the Thanks for getting to this so promptly! |
See #251 and notheotherben/sendgrid-ts-demo#1 for more details on what wasn't working.
This ensures that the following code works correctly: