-
-
Notifications
You must be signed in to change notification settings - Fork 209
vscode does not recognize .svelte
files imported in .ts
files
#1725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Did you enable the Svelte TypeScript plugin? The vs code setting is called |
yeah that's set to |
still doesn't seem to work. also how come your |
I have encountered the same problem, and changing the TypeScript version through Cmd-Shift-P "TypeScript: Select TypeScript version..." to version 4.9.3 ('Use Workspace version' in my case) solved the problem. Before changing it has been set to 5.0.0-dev20221217 ('Use VS Code's Version'). |
@hangilc doesn't fix it for me |
I can reproduce what @hangilc is seeing. One of the TypeScript APIs we used in the TypeScript plugin no longer works the same in ts 5.0. @DetachHead if you follow what @hangilc said, what's the version you're seeing in the "Use VS Code's Version" option? If it's not TypeScript 5.x. We'll need a reproduction repository. I can't reproduce it with your steps. |
hmm, now i can't get it to happen anymore. i'll close this issue for now and will re-open and try to provide a repro repo if it happens again. thanks |
@jasonlyu123 would you open a PR to fix the plugin for upcoming TS 5.x? Is it possible to do this in a backwards-compatible way? |
if it doesn't work in 5.x, i'll reopen this |
I assume this was fixed, therefore closing. |
Describe the bug
i'm not quite sure it's even supposed to be allowed, but i stumbled across a project that has lots of
.ts
files importing.svelte
files that seem to work at runtime, but not in vscode.i suspect it's because it's using the typescript language server instead of the svelte one?
Reproduction
Expected behaviour
no error
System Info
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
The text was updated successfully, but these errors were encountered: