Today I was frustrated by Typescript for the first time. I used a dep which was originally written in TS, and debugging it was a major PITA.
Additionally, @WebStormIDE goes to the d.ts when you "Go to source", which is never what I want.
-
Show this thread
-
Or is it called "Go to declaration" or smth. Anyways, one of the most common things you do in an IDE...
1 reply 0 retweets 1 likeShow this thread -
Replying to @eDominykas
Hi, we believe that for .ts files Go to Definition should prefer d.ts or .ts files to .js files because from the TypeScript's perspective they are the source of truth. Go to Implementation will try to take you to the .js file if they are available.
2 replies 0 retweets 3 likes -
Replying to @WebStormIDE
I get the logic, but it's just never what I want (although I do not write Typescript, so maybe if I did - there'd be a point in that maybe), however I'm sure there's a way to go to source and display the definition there in some form (overlay? Gray text), esp. if source is JS.
1 reply 0 retweets 0 likes -
Replying to @eDominykas
So were you navigating from a .js or .ts file? If it was .js, we try to find the JavaScript definition on Cmd/Ctrl-click.
1 reply 0 retweets 0 likes -
Replying to @WebStormIDE
Both - Cmd+Click and Cmd+Shift+Click go to the definition, not the implementation, even from JS files - not sure if that's a bug or is that configurable?
1 reply 0 retweets 0 likes -
Replying to @eDominykas @WebStormIDE
Right click -> Go to -> Implementation(s) also goes to the .d.ts - that's definitely a bug, right?
1 reply 0 retweets 0 likes
Depends on the package – in some cases, it's rather hard to map the definition in .js file
Can you share a screenshot showing the code in which you've used it? Thanks!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.