Search code examples
typescriptphpstormwebstormtype-inference

How to show inferred TypeScript type in 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?


Solution

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

    enter image description here