https://github.com/flolu/stackoverflow-typescript-go-to-definition
👉 Example Repository for Stackoverflow Question about VSCode and Typescript
https://github.com/flolu/stackoverflow-typescript-go-to-definition
javascript monorepo typescript visualstudiocode vscode yarn
Last synced: about 2 months ago
JSON representation
👉 Example Repository for Stackoverflow Question about VSCode and Typescript
- Host: GitHub
- URL: https://github.com/flolu/stackoverflow-typescript-go-to-definition
- Owner: flolu
- Created: 2019-08-28T17:22:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T11:38:29.000Z (over 3 years ago)
- Last Synced: 2025-04-27T12:33:46.002Z (12 months ago)
- Topics: javascript, monorepo, typescript, visualstudiocode, vscode, yarn
- Language: TypeScript
- Homepage: https://stackoverflow.com/questions/57697571
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Setup
```
yarn bootstrap
```
# Gist
All source code file are written in Typescript (`.ts`) under `/src` folder.
All compiled files (`.js` and `.ts`) are located under `/dist` (those files are created by the typescript compiler)
# Replicate Issue
> This issue happens in Visual Studio Code
1. Run `yarn bootstrap`
2. Open `/services/example-service/src/index.ts`
3. Right click on `Food` and choose "Go to Definition"
## Current behavior
VSCode opens `/packages/example-package/dist/index.d.ts`
## Expected behavior
VSCode opens `/packages/example-package/src/index.ts`
# Issue
When I'm editing the typescript source code (in `/src`), I want to be able to click on any imported object via `right click + go to definition` or `F12` to jump to the definition in the respective packages' `/src` folder.
But what happens instead, is that it opens the `.d.ts` file in the `/dist` folder.
> Is it possible to change this behavior?