{{ message }}
fix: update MailService constructor property definition in TypeScript declaration#921
Merged
Merged
Conversation
Before, `{MailService: MailService}` suggested an instance of `MailService` was being passed. Changing the syntax to `{new(): MailService}` suggests that it's a callable constructor reference available as a property
Contributor
|
Do you mind giving this one a quick look? Thanks! |
notheotherben
left a comment
Contributor
There was a problem hiding this comment.
Good catch, however I believe you can also use typeof MailService to more correctly reflect the fact that the property is actually exposing the full (uninstantiated) type.
Use `typeof MailService` over `{new (): MailService}` to indicate constructor reference
Contributor
Author
|
@spartan563 you're right; made the change to |
notheotherben
approved these changes
May 3, 2019
notheotherben
left a comment
Contributor
There was a problem hiding this comment.
Looks great, thanks Daniel.
|
@thinkingserious any reason this wasn't merged? This is forcing us to use ugly hacks anywhere we need to create a new instance of that class. |
Closed
389fa8c to
37473ad
Compare
childish-sambino
approved these changes
Feb 12, 2020
Contributor
This was referenced Feb 12, 2020
Closed
This was referenced Apr 17, 2020
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.

Before,
{MailService: MailService}suggested an instance ofMailServicewas being passed. Changing the syntax to{new(): MailService}typeof MailServicesuggests that it's a callable constructor reference available as a propertyFixes
Checklist
Short description of what this PR does:
If you have questions, please send an email to SendGrid, or file a Github Issue in this repository.