Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Type safety without writing the types yourself? This is now possible for all methods and variables with special meaning to SvelteKit!

85,456 Aufrufe • vor 3 Jahren •via X (Twitter)

10 Kommentare

Profilbild von Simon H
Simon Hvor 3 Jahren

This all started with @shuding_ sharing his work of auto-typings for Next.js. It got us inspired to see what this could look like for SvelteKit. I prototyped this and we immediately felt an improvement in productivity and DX.

Profilbild von Simon H
Simon Hvor 3 Jahren

While this is super convenient, this isn't just about that. It's also about correctness: I forgot or got some types mixed up more than once - the computer never will.

Profilbild von Simon H
Simon Hvor 3 Jahren

This is in line with Svelte's major insight that by writing code in a declarative way we can get the machine to do the bulk of the work for us, correctly and efficiently.

Profilbild von Simon H
Simon Hvor 3 Jahren

Check out the blog post for more info:

Profilbild von Hunter Johnston
Hunter Johnstonvor 3 Jahren

As usual, you and your team's work is incredible and appreciated!

Profilbild von JYC 🦋
JYC 🦋vor 3 Jahren

Hyped!!! I guess that we have some homework to do over the weekend now 😅 +page.gql 😉

Profilbild von Fabian B.
Fabian B.vor 3 Jahren

One of the things I love about @nuxt_js 3 💚

Profilbild von Thomas G Lopes 🦋
Thomas G Lopes 🦋vor 3 Jahren

This is amazing! Great work 🎉 Would be perfect to have typescript syntax working on template as well for full type-safety everywhere in Svelte. Fingers crossed!

Profilbild von Richard Simpson / Moro
Richard Simpson / Morovor 3 Jahren

wait wait wait wait wait. How in the world does that export validation work 👀👀

Profilbild von Simon H
Simon Hvor 3 Jahren

It's part of the typescript plugin. It looks at the TS AST to check the top level exports and adds a custom error message if there's an invalid one

Ähnliche Videos