简体   繁体   中英

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. 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:

"Not really. Tern doesn't use type names when showing function types, because those would usually be unhelpful."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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