typescript[satisfies] bugs in complex ternary conditions
See original GitHub issuepackage.json {
"@typescript-eslint/eslint-plugin": "5.46.0",
"@typescript-eslint/parser": "5.46.0",
"prettier": "2.8.1",
"typescript": "4.9.3"
}
Bug:
What happens: The formatter, somehow, stops working on the file and sometimes I have to restart Intellij IDEA Ultimate for the formatter to start working across all the project again.
Expected behavior: not to bug because this is valid typescript code.
Issue Analytics
- State:
- Created 9 months ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Strange bug with ternary -> not respecting union with undefined
Your issue essentially boils down to the array access returning the type { a: number, b: string } , and not { a:...
Read more >A compiler error while using ternary operator - Stack Overflow
I am using typescript 0.9. 0.1 in Visual Studio 2012. At a time I use ternary operator in my code, compiler throws an...
Read more >Ternary operators should not be nested - SonarSource Rules
TypeScript static code analysis. Unique rules to find Bugs, Vulnerabilities, Security Hotspots, and Code Smells in your TYPESCRIPT code.
Read more >Using The Ternary Operator And Nullish Coalescing
What is the most succinct and elegant method of writing one-liner conditionals? Let's look at the ternary operator and nullish coalescing!
Read more >Is using nested ternary statements a bad practice? - Quora
But no, using nested ternary expressions is not a bad practice. In fact, there are benefits to using ternaries over if statements because...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just discovered that it works if I set
"parser": "babel-ts"
. I don’t know why it doesn’t work withtypescript
though since it should be supported by @typescript-eslint/typescript-estree.This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don’t have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.