πππ
@sveltejs has added TypeScript support!
TS support was probably *the most* requested addition to Svelte and it's finally here - Svelte now comes with a TypeScript support out of the boxπ₯
Check out this quick @eggheadio lesson to get started! π
egghead.io/lessons/svelte-crβ¦
...and there's also a command line tool, svelte-check. it's pretty cool. if you've been holding off trying Svelte because you need TypeScript support, then, welcome to the party!
here's a few screenshots, using the new official VS Code extension (marketplace.visualstudio.comβ¦). in this one, we've got TypeScript inside a <script> block, and autocomplete on an inline component:
ok, we've kept you in suspense long enough. we are absolutely cock-a-hoop to announce that Svelte now officially supports...
πππ TYPESCRIPT!!! πππ
svelte.dev/blog/svelte-and-tβ¦
amazing, amazing work by @orta, dummdidumm, jasonlyu123, @UnwrittenFun, @halfnelson_au and @octref
oh and you can use it to collect an array of values, if you're using a <select multiple> or a group of checkbox inputs: svelte.dev/repl/02eda4dbf106β¦
we have a major announcement coming soon (days? hours? tbd) and it's taking considerable self-discipline not to just blurt it out before everything is ready
the neat thing about this is that you can use any object as the value β if you use event.currentTarget.value in an event handler like *ahem* some frameworks force you to, the value has to be a string. Bindings are a smarter way to handle user input.
Demo: svelte.dev/repl/2b143322f242β¦
You can use @sveltejs crossfade to transition item from 1 layout to another, and the visual result is amazing π
Checkout the REPL:
svelte.dev/repl/a7af336f906cβ¦
Or I am gonna show you how to do it in 4οΈβ£ steps πππ