简体   繁体   English

在代码完成中使用类型名称而不是!type值

[英]Use type name instead of the !type value in code completion

I have a function which has a resultData parameter with the type of DataView. 我有一个函数,其resultData参数的类型为DataView。 This looks like the following in the code completion tooltip. 这在代码完成工具提示中如下所示。

...resultData: fn(buffer: +ArrayBuffer, byteOffset?: number, byteLength?: number)...

My preffered code completion would be: 我的优先代码完成将是:

...resultData: DataView... 

Is that somehow managable? 这是以某种方式管理的吗?

After reaching out one of the Tern.js developers he answered the following: 在联系了Tern.js的一位开发人员之后,他回答了以下问题:

"Not really. Tern doesn't use type names when showing function types, because those would usually be unhelpful." “不是真的.Tern在显示函数类型时不使用类型名称,因为那些通常是无益的。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过使用名称而不是javascript中的ID获取输入类型文本的值 - Get value of input type text by using Name instead of Id in javascript 强制NetBeans为假定特定类型的JavaScript变量提供代码完成 - Force NetBeans to provide code completion for a JavaScript variable assuming a specific type 为 function 参数定义 object 类型/在 VS 代码中自动完成 - Define object type for function parameter / get auto completion in VS Code 我可以将 mail() 用于此代码吗? <input type="text" name="current_user_first_name" value="<?php echo $current_user_firstname; ?>"> - can i use mail() for this code "<input type='text' name='current_user_first_name' value='<?php echo $current_user_firstname; ?>'> jQuery-更改类型=复选框,而不是在此代码中选择 - Jquery - change type = Checkbox instead of select in this code Typescript类使用接口作为类型而不是实现 - Typescript Class use Interface as type instead of implement 在 typescript 中使用接口而不是“任何”类型 - Use of interface instead of 'any' type in typescript 为什么输入值显示的是字符串类型而不是数字类型? - why the input value shows a type of string instead of type of number? 如何使用 TS 类型作为值 - How to use TS type as a value 在 TS 上使用其他类型中的类型名称 - Use name of type in other types on TS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM