You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now if you hyperclick on a symbol in VS Code it will take you to the typedef. If you want to go to the implementation you have to right click and select ‘Go to Implementations.’
Apparently, if you generate declaration maps (like sourcemaps, for typedefs) then hyperclick goes to the implementation instead.
what do we have to do exactly , can you please explain a bit more , because the declarationMap changes are already there in the tsconfig.json file , which generate the maps.
You're not wrong, @shivaji43! I was hoping that posting this issue would mean that I could stop thinking about this problem, but here we are :)
Having looked into it, it dawns on me that hyperclick (go to definition) does not work today because we don't include the source code in the published npm packages.
I really didn't want to include the source in the published npm packages, because this causes strife for people who – for instance – publish their software to cloud services like AWS Lambda, and don't want to publish megabytes of code that does nothing.
So I guess we have a few options.
Forget it.
Include source files in the npm packages (by adding them to the files field of package.json) package size be damned.
Generate declaration maps from the compiled source code (ie. the files in dist/*.mjs).
Including source files is not a good idea , I think even generating declaration maps can take significant size in the packages , as far as I know it is not possible without the source files , if you can suggest me some more options (if there) I am open to try them.
Motivation
Right now if you hyperclick on a symbol in VS Code it will take you to the typedef. If you want to go to the implementation you have to right click and select ‘Go to Implementations.’
Apparently, if you generate declaration maps (like sourcemaps, for typedefs) then hyperclick goes to the implementation instead.
Details
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#new---declarationmap
The text was updated successfully, but these errors were encountered: