I use Rubymine, but I am in the minority using Typescript there, so I'll ask over here first in hopes that what I want to do is actually possible.
I can do the following in Typescript:
var someTypedObject : Foo = new Foo();
...A few lines later:
var someObject = someTypedObject;
In this example, someObject will have the type of "Foo" due to type inference.
Furthermore, Webstorm knows this because I can run "View->Evaluate ExpressionType" and it will tell me that it's of type "Foo". So far, so good. But now I want to jump to the definition of Foo. How do I do that?
(In this example, I can just CMD+click on Foo, but I don't always have a type declaration around). How do I tell Typescript to jump to the evaluated type of an expression? This would also be helpful in cases like:
In this case, I have to jump to the method definition, see that it returns a type "Bar", and then jump to Bar. Is it possible to select the function "someFunctionHereThatReturnsBar" and jump directly to the type Bar?
We're considering changing our coding style to rely more upon type inference since the following is often redundant:
var someObject : Foo = someTypedObject;
...but I am hesitant to do so if we lose the ability to quickly determine an object's type and jump to the type defintiion.
Many thanks in advance for any help you can offer.