TypeScript code is not recogonized #8810
-
Describe the bugSvelteKit is not recognising TypeScript code.This is a mini project with some modifications based on the Can anyone have a look at my reproduction repo to see what I did wrong? Thanks for the help. I believe it should be my own issue since I believe there's no way that Svelte won't work with TypeScript. Reproductionhttps://github.com/xsjcTony/50projects50days-svelte LogsNo response System InfoSystem:
OS: Windows 10 10.0.19045
CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz
Memory: 42.50 GB / 63.84 GB
Binaries:
Node: 18.12.1 - C:\NodeJS\node.EXE
Yarn: 1.22.19 - C:\NodeJS\yarn.CMD
npm: 9.4.0 - C:\NodeJS\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (109.0.1518.69)
Internet Explorer: 11.0.19041.1566
npmPackages:
@sveltejs/adapter-static: ^1.0.5 => 1.0.5
@sveltejs/kit: ^1.3.6 => 1.3.6
svelte: ^3.55.1 => 3.55.1
vite: ^4.0.4 => 4.0.4 Severityblocking all usage of SvelteKit Additional InformationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Just a guess, but the './types' path might be reserved because Svelte uses it for automatically typing the data returned from load functions. Does it work if you change the name of the types file to something else? |
Beta Was this translation helpful? Give feedback.
-
The reserved name is I believe it's the Transfering this to a discussion. |
Beta Was this translation helpful? Give feedback.
The reserved name is
./$types
, so that can't be it.I believe it's the
svelte.config.ts
- you need that to be asvelte.config.js
, there's no TS support for that config file.Transfering this to a discussion.