OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Why doesn't IntelliSense visual-studio offer methods?

  • Thread starter Thread starter Maxim
  • Start date Start date
M

Maxim

Guest
Here is a simple example describing the IDE behavior, the reasons for which are not clear to me.

There is a function that takes an array as an argument. Then, in the body of the function I want to call a method on this array, for example .findIndex(), and I expect the IntelliSense system to offer me options corresponding to the typed characters, but this does not happen.

Example of code where IntelliSense does not work

However, if I specify a default value for the argument in the function definition, in this case an empty array literal, the IntelliSense system works as I expect.

Sample code where IntelliSense works the way I expect it to work

I suspect that there is some setting that can change this behavior. I would be grateful if anyone can tell me what I need to do.

I tried searching for a setting in the settings, named IntelliSense, but nothing that would solve my problem was found.

<p>Here is a simple example describing the IDE behavior, the reasons for which are not clear to me.</p>
<p>There is a function that takes an array as an argument.
Then, in the body of the function I want to call a method on this array, for example <code>.findIndex()</code>, and I expect the IntelliSense system to offer me options corresponding to the typed characters, but this does not happen.</p>
<p><a href="https://i.sstatic.net/CbHVVlqr.jpg" rel="nofollow noreferrer">Example of code where IntelliSense does not work</a></p>
<p>However, if I specify a default value for the argument in the function definition, in this case an empty array literal, the IntelliSense system works as I expect.</p>
<p><a href="https://i.sstatic.net/CoMeuhrk.jpg" rel="nofollow noreferrer">Sample code where IntelliSense works the way I expect it to work</a></p>
<p>I suspect that there is some setting that can change this behavior. I would be grateful if anyone can tell me what I need to do.</p>
<p>I tried searching for a setting in the settings, named IntelliSense, but nothing that would solve my problem was found.</p>
 
Top