Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
feat: [4.7] support optional variance annotation#4831
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat: [4.7] support optional variance annotation#4831
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nx-cloudbot commentedApr 17, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thanks for the PR,@sosukesuzuki! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day. |
netlifybot commentedApr 17, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
👷 Deploy request fortypescript-eslint pending review.Visit the deploys page to approve it
|
i merged the version bump so this can be rebased on top of main |
codecovbot commentedMay 17, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## main #4831 +/- ##==========================================+ Coverage 91.32% 91.70% +0.38%========================================== Files 132 359 +227 Lines 1487 12117 +10630 Branches 224 3518 +3294 ==========================================+ Hits 1358 11112 +9754- Misses 65 657 +592- Partials 64 348 +284
Flags with carried forward coverage won't be shown.Click here to find out more.
|
@@ -2342,6 +2362,7 @@ export class Converter { | |||
? this.convertType(node.constraint) | |||
: undefined, | |||
default: node.default ? this.convertType(node.default) : undefined, | |||
...this.convertTypeParamVariances(node.modifiers), |
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.
what do you think about changing it tohasModifier
to be consistent with other use cases?
...this.convertTypeParamVariances(node.modifiers), | |
in:hasModifier(SyntaxKind.InKeyword,node)||undefined, | |
out:hasModifier(SyntaxKind.OutKeyword,node)||undefined, |
bradzacherMay 17, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
instead ofundefined
- could we make itfalse
?
I'd love for us to standardise on not emittingundefined
for properties.
I personally don't like having 3 states on a flag - the keyword is either there, or it's not - there's no 3rd state!
Uh oh!
There was an error while loading.Please reload this page.
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.
this LGTM now! Thanks so much for helping us prep for 4.7!
Uh oh!
There was an error while loading.Please reload this page.
there's a few snapshots which need regenerating in |
Thank you for reviewing! I've updated tests! |
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.
brilliant - thanks for all your hard work!
Uh oh!
There was an error while loading.Please reload this page.
PR Checklist
Overview
Based on#4829
Support optional variance syntax.