SvelteKit ./$types can't be found in +page.server.ts
VSCode: 1.94.2
OS: MacOS Sequoia 15.0.1
Deno: 2.0.2
Deno Extension: 3.42.0
Typescript: 5.6.3
After some research/testing I can't get Deno 2.0.2 to find
./$types for sveltekit. I'm not sure if i need to explicitly reference the generated tsconfig.json or I'm missing something else. A current workaround is to import from a much longer relative path (ie import type { PageServerLoad } from "../../.svelte-kit/types/src/routes/$types.d.ts";) but of course ./$types) would be preferred.
This is the exact error vscode intellisense is giving me:
This is the smallest reproduction I could create:
Run "Deno: Enable" in vscode command palette to create .vscode/settings.json with this content:
Use the deno vite plugin in vite.config.ts:
I create a src/routes/+page.server.ts file with the following data
Thanks for any help you can offer!0 Replies