question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Boolean intellisense

See original GitHub issue

Intellisense is great for things like typeof, so why not make it great for boolean types too!

I think adding intellisense for booleans saves a bit of typing, and it still hasn’t been implemented.

Look at this:

const a = (): boolean => true;
a() === // [true, false] intellisense prompt
const b = a();

if (b === /* [true, false] intellisense prompt*/) 

I think this would be a great addition to Intellisense. Any feedback is appreciated.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
DanielRosenwassercommented, Feb 19, 2019

Apart from loose equality, why would you write either

x === true
x !== true

instead of the following?

x
!x
1reaction
RyanCavanaughcommented, Feb 20, 2019

Probably the best UX upside is that if you write if (foo() === thinking foo returned some other type, you’d see true/false in the completion list and immediately know what was up

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intellisense doesn't suggest boolean values - Visual Studio Feedback
A function has a boolean parameter. When I write a call to the function and press 't' on the parameter, intellisense suggests everything...
Read more >
Visual Basic IntelliSense - Visual Studio (Windows)
When a statement will refer to a Boolean , IntelliSense displays a true-false drop-down menu. Completion can be turned off by default by ......
Read more >
VS Code Intellisense when input boolean value #3834 - GitHub
Hi, when input boolean value intellisense does not show the right value for true or false. the value considered as text value.
Read more >
VSC - IntelliSense marks boolean operator as errors
IntelliSense is incorrectly marking boolean operators ( and , or , etc.) As errors. Here is an example: enter image description here.
Read more >
Boolean Functions in VBA
Code VBA IntelliSense makes these function accessible under submenu VBA , see screenshot. intellisense menu with boolean functions .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found