Svelte <3 TypeScript ↦
Orta Therox, making the big announcement on behalf of the Svelte team:
We think it’ll give you a much nicer development experience — one that also scales beautifully to larger Svelte code bases — regardless of whether you use TypeScript or JavaScript.
Up until now TypeScript was usable with Svelte, but not officially supported by the project. What does that official support look like?
- You can use TypeScript inside your
<script>
blocks — just add thelang="ts"
attribute- Components with TypeScript can be type-checked with the
svelte-check
command- You get autocompletion hints and type-checking as you’re writing components, even in expressions inside markup
- TypeScript files understand the Svelte component API — no more red squiggles when you import a
.svelte
file into a.ts
module
I know a lot of people have been waiting for this. Congrats to all involved on a big release!
Discussion
Sign in or Join to comment or subscribe