I am working on a typescript project with Visual Studio Code including multiple npm packages structured like this:
- Source code:
/src/index.ts
- Compiled code:
/dist/...
When I right click on imported objects and choose "Go to Definition" or click F12
or by clicking on the object with holding down CTRL
, Visual Studio Code opens the corresponding .d.ts
file in /dist
However, I want VSCode to open the corresponding .ts
file in /src
Is it possible to change this behavior, as it is really annoying to manually search for the source file.
I've created git repo, so that you can try it yourself: https://github.com/flolude/stackoverflow-typescript-go-to-definition
- you just need to run
yarn bootstrap
in order to replicate the issue.
from Go to Typescript Source Definition instead of Compiled Definition in Visual Studio Code
No comments:
Post a Comment