Closed BrianIto closed 1 year ago
I have the same problem as well, and there is no error to suggest there is anything wrong as well.
import { sum } from "./function.js"
This is the correct and recommended way to import ts files (type: module in package.json), webstorm and tsc will know that it is referring to a typescript file instead of js, this also reduces any transpilation and only compilation as tsc is a compiler and not a transpiler.
Migrated to WEB-54246 Svelte plugin imports using .js extension on TypeScript blocks.
I got this problem when using endpoints, creating functions, or something else...
I create a TypeScript file, like this one:
but when I use the auto-import for the plugin, it happens;
causing this error:
This problem is easy to revert by just changing its extension to .TS, but it's annoying when you have to do it on almost every import, doing it like 200 times. If there's an error with my IDE, please, let me know, I want to fix this problem soon as possible.
Caused by: WebStorm 2022.2.1 OS: macOS Monterrey 12.5.1 Platform: Macbook Air M1 2020.