如何在WebStorm中显示推断的TypeScript类型? [英] How to show inferred TypeScript type in WebStorm?

查看:942
本文介绍了如何在WebStorm中显示推断的TypeScript类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VS2012中,您可以将鼠标悬停在typescript变量上,它将显示推断出的类型. Webstorm有类似的功能吗?

In VS2012, you can hover over a typescript variable and it will show you the inferred type. Is there a similar feature in webstorm?

推荐答案

虽然不完美.按下 Ctrl 键(或在macOS上为⌘Cmd ),然后用鼠标悬停在变量上以在webstorm中插入推理逻辑:

Although not perfect. Press the Ctrl key (or ⌘ Cmd on macOS) and hover over a variable with the mouse to kick in the inference logic in webstorm :

这篇关于如何在WebStorm中显示推断的TypeScript类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆