Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Message in Visual Studio Code

This is something that is anoyinng me really hard. Everytime I put any "( )", this message appear: log(… data: any[]): void

Photo

Anyone knows how to disable it?? Or where is it coming from??

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It’s useful info – it’s telling you the signature of the function, of what arguments it takes and what it returns.

...data means that it accepts any number of arguments, and any means that the arguments can be of any type.

(In comparison, for example, calling toFixed on a number shows you Number.toFixed(fractionDigits?: number): string – it takes one argument, which is a number, and returns a string)

Type information like this is incredibly useful – I’d have a harder time programming without it, and I’d suggest learning the syntax and getting used to it. It’s quite nice when dealing with a function that you aren’t completely familiar with.

But if you want to disable it, you can open VSCode settings, search for parameterHints, and turn it off:

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading