Post

You can import .ts files. Explicit ext is so much better. This kind of thing is out of scope for svelte. If anything, it should be resolved upstream via node or typescript.

Still not fully convinced by it too, but not that against it either, so I migrated my website. Ultimately, I figured I already use e.g. .svelte or .json in various imports, so why not make .js explicit as well.

One thing it saves me from is that I no longer get confused by something like import { function } from “file.svelte” // file.svelte.ts I use snake case, so I usually don’t notice File.svelte vs file.svelte when skimming.