Загрузка видео...

Не удалось загрузить видео

На главную

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

85,413 просмотров • 3 лет назад •via X (Twitter)

Комментарии: 10

Фото профиля Simon H
Simon H3 лет назад

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.

Фото профиля Simon H
Simon H3 лет назад

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.

Фото профиля Simon H
Simon H3 лет назад

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.

Фото профиля Simon H
Simon H3 лет назад

Check out the blog post for more info:

Фото профиля Hunter Johnston
Hunter Johnston3 лет назад

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

Фото профиля JYC 🦋
JYC 🦋3 лет назад

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

Фото профиля Fabian B.
Fabian B.3 лет назад

One of the things I love about @nuxt_js 3 💚

Фото профиля Thomas G Lopes 🦋
Thomas G Lopes 🦋3 лет назад

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!

Фото профиля Richard Simpson / Moro
Richard Simpson / Moro3 лет назад

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

Фото профиля Simon H
Simon H3 лет назад

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

Похожие видео