[英]Message in Visual Studio Code
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. ...data
意味着它接受任意数量的参数, any
意味着参数可以是任何类型。
(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) (相比之下,例如,对数字调用
toFixed
显示Number.toFixed(fractionDigits?: number): 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:但是如果你想禁用它,你可以打开 VSCode 设置,搜索
parameterHints
,然后将其关闭:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.