logoalt Hacker News

filleduchaoslast Sunday at 10:14 PM2 repliesview on HN

It doesn't. You might be thinking of libraries that you wrote, not packages from e.g. npm, which are distributed as JavaScript + type definition files not as TypeScript code.


Replies

sthucklast Sunday at 11:08 PM

It should work if the library was compiled with deceleration map option. Which most libraries are not and it's a shame.

It was added like 3 years ago which was probably a bit too late, not even sure why it's not the default. (File size?)

homebrewerlast Sunday at 11:51 PM

In real IDEs, not glorified text editors like VSCode, it does. I use this often in IDEA, it's muscle memory so I'm not even completely sure what to press, but it's likely "go to definition" and by default is tied to ctrl+alt+b.

IDEA adds its own analysis on top of that provided by the language server.

Works on JS + every variant of type definitions I've ever seen, among many other things (not only programming languages, but also database objects, etc).