Go to definition on Svelte component from ts file takes you to SvelteComponentDev interface
See original GitHub issueDescribe the bug
When you ctrl-click or right-click - Go to definition on a Svelte Component from a ts file you are taken to source code of the SvelteComponentDev Interface
To Reproduce
Create a new ts project:
npx degit sveltejs/template svelte-typescript-app
cd svelte-typescript-app
node scripts/setupTypeScript.js
Open vscode
Open main.ts
in the import App from './App.svelte';
line, ctrlk-click on App
or on ./App.svelte
Expected behavior Take you to the App.Svelte file, like what happens when you do it from a .svelte file
Screenshots
System (please complete the following information):
- OS: Ubuntu 18.04
- IDE: vscode
- Plugin/Package: “Svelte for VSCode”
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How do you import a Svelte component in a Typescript file?
The typescript compiler need to know about ./Component.svelte module. You need to define it. Rollup is a bundler, and it needs to know...
Read more >Special elements / <svelte:component> • Svelte Tutorial
A component can change its category altogether with <svelte:component> . Instead of a sequence of if blocks... The this value can be any...
Read more >TypeScript support in Svelte - Learn web development
We'll define a TodoType type to see how TypeScript enforces that anything passed to a component expecting a TodoType will be structurally ...
Read more >Question about using Svelte component in .ts file : r/sveltejs
svelte '; export const routes = { home: { path: '/', component: Home, } };. The errors are: Type 'typeof SvelteComponentDev' is missing...
Read more >Why Typescript and Svelte are a match made in heaven
Svelte is an emerging framework for building out front-end components with JavaScript, HTML, and CSS. It's pretty cool on its own, but it's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I suppossed it wasn’t going to be so easy to handle .ts files, just wanted to leave it here in case anybody finds out how to handle it.
BTW, great job, the plugin is marvellous!
I have it enabled in the settings and even added the standalone npm package as a plugin, but I still have the issue.