4 ms·
Well, good news for you, it does! Very well, in fact. Svelte itself is written in TypeScript.
by marcus_cemes 5y ago
Well, good news for you, it does! Very well, in fact. Svelte itself is written in TypeScript.
- IshKebab 5y agoSo is he wrong about not being able to type check that then?
- marcus_cemes 5y agoWell, yes, to my understanding. If you add lang="ts" to the script block, you can write normal TypeScript code for the component logic, and it will also check props that you are passing to child components in the template. It's like renaming the file from ".jsx" to ".tsx". It might not be perfect, but I haven't encountered any problems with it so far.