-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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(parser): allow to visit typeParameters in OptionalCallExpression #1377
fix(parser): allow to visit typeParameters in OptionalCallExpression #1377
Conversation
- add missing test case for type parameters in optional call expression
Thanks for the PR, @armano2! 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 on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
...ared-fixtures/fixtures/typescript/expressions/optional-call-expression-type-arguments.src.ts
Show resolved
Hide resolved
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.
LGTM - thanks!
@@ -366,7 +366,7 @@ function parseAndGenerateServices<T extends TSESTreeOptions = TSESTreeOptions>( | |||
)!; | |||
|
|||
/** | |||
* Determine whether or not two-way maps of converted AST nodes should be preserved | |||
* Determine whatever or not two-way maps of converted AST nodes should be preserved |
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.
wasn't this correct?
Sounds strange now 🤔
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.
@BO41 hmm, you might be right, "whatever or not" seems weird
The addition of the "or not" is neither logically nor grammatically required. I think it's often used conversationally for emphasis. I definitely wouldn't use it in writing myself.
https://english.stackexchange.com/questions/3382/whether-or-not-vs-whether
—used as a function word usually with correlative or or with or whether to indicate (1) until the early 19th century a direct question involving alternatives; (2) an indirect question involving stated or implied alternatives
https://www.merriam-webster.com/dictionary/whether
Q: When you use “whether,” do you need “or not”? I find “whether” being used alone for “if,” and I wonder what is correct.
A: In the phrase “whether or not,” the “or not” is often optional. When the choice is up to you, you can generally use either “whether” or “if.”
i think it will be safer to change it to
* Determine whatever or not two-way maps of converted AST nodes should be preserved | |
* Determine if two-way maps of converted AST nodes should be preserved |
what do you think? i'm not that good at grammar
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.
just the "if" sounds good 👍
Or just "whether" (not "whatever" ;)
allow to visit typeParameters in OptionalCallExpression