This is something that is annoying me really hard. Every time I put any ( )
, this message appear: log(... data: any[]): void
Anyone knows how to disable it?? Or where is it coming from??
CodePudding user response:
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: