r/sveltejs • • 27d ago

typescript 7 support

How long until typescript 7 is supported in svelte and sveltekit? The new ts is made with go but they've changed their api so sveltekit and svelte-check doesn't work with it.

I know it came out this year but kit, svelte-check need typescript 6.0.3 to run.

24 Upvotes

12 comments sorted by

5

u/nhanpt 27d ago

Svelte-check need typescript 7.1 in order to work

2

u/gatwell702 27d ago

But it works?

5

u/Equivalent_Head_4803 27d ago

Not to my knowledge.

22

u/jasonlyu123 27d ago

svelte-check has --tsgo-experimental-api and --tsgo flags for experimental TypeScript 7 support. --tsgo doesn't have experimental in its name but is also considered experimental. It's slightly faster than --tsgo-experimental-api but has several limitations.

Right now, you need both TypeScript 6 and 7 installed to use these 2 flags. TypeScript 7.1 will have most of the API that svelte-check needs to work without TypeScript 6. But svelte-check will need to migrate to the new APIs. It'll probably be available after TypeScript 7.1 is released.

TypeScript 7.1 will also add a content-mapper API for editor support. It will require some migration in your project and the component libraries. It won't just be updating package.json to bump versions.

7

u/Rocket_Scientist2 27d ago

svelte-check works with the experimental tsgo flag. It's not 100%, but it's close. I've contributed to the few bugs I've ran into, but some are blocked until the API release.

3

u/Cachesmr 27d ago

There are some tsgo flags on svelte check. Oxlint support is also far away, because they are blocked upstream by oxc. Supposedly it's gonna be getting done on q1 2027.

Leads to having an annoying mix of tooling that breaks some IDEs.

3

u/sparrownestno 27d ago

Svelte (and Astro, eslint and many others) rely on the ts api, and Microsoft decided that wasn’t as critical for the release, hence it got scope to 7.1 release, which dropped the first beta two weeks ago (probably a few related post below)

so if everything ljust works” it should be stable and then bump and migrate and roll out in a bit

1

u/Spare_Message_3607 26d ago

7.1 beta is out, and the new content mappers API are relevant, is the new way to generate types from custom files like .svelte or .astro.

So either remove svelte2tsx library as the bridge or change its internals.

1

u/fubits_dev 24d ago

it rather depends on the TypeScript 7.1 release than on Svelte https://bsky.app/profile/dummdidumm.bsky.social/post/3mzkumdyrj224

0

u/AlanDanielx 27d ago

We need this !!

0

u/[deleted] 27d ago

[removed] — view removed comment

1

u/gatwell702 27d ago

It sucks that I have to have dual dependencies though