简体   繁体   English

Visual Studio Code 中的消息

[英]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每次我输入任何“( )”时,都会出现此消息: log(... data: any[]): void

Photo照片

Anyone knows how to disable it??有谁知道怎么禁用?? Or where is it coming from??或者是哪里来的??

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM