Rich on why the Svelte 4.0 codebase is moving to JSDoc... 🤔

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

"Non Standard language like TypeScript" Well said, Well said

tomodiero
Автор

As long as svelte itself still supports TS, it’s all good. Will it?

RonaldTetsuoMiura
Автор

Wasn’t expecting to be convinced. Good surprise.

iatheman
Автор

I personally maintain a library written in TS. My library is small enough that recompiling on save is fast and not a problem, and using yarn link means I am kinda able to fiddle with the code and expect things to work.
It's not a great debugging experience though, as what I see in the debug tools is the compiled JS. Maybe there's a way to set up the source maps so I can see the TS directly? But yeah, it is a pain.
I love TS, but I totally understand your point, I may even migrate away from TS too at some point.

Автор

You can fiddle with the code if you’re building with Deno! 😮

chill-potato
Автор

That's a refreshing change!
I never got into TS because I already knew of JSDoc years ago. Now I'm curious about how you write it.
For me, it's exactly the same argument for not using TS – transpiling.

karlheinzneugebauer
Автор

Bravo!. These bold moves will keep Svelte on the top

BorisBarroso
Автор

For a library, totally understandable 👍🏼

ilkou
Автор

to be honest, Svelte’s source-code on Typescript is never been type-safe due to holey type coverage

paulmalys
Автор

Im unsure about this. Sveltekit seems to have a lot of problems related to typing already. And I hate when comments are used to stuff besides commenting..

danvilela
Автор

I expect many people will continue to use TS in their actual applications, but for library development, this approach makes, like... more sense.

sasca
Автор

One clarification he made that didn't make it into the short video, his JSDoc preference over Typescript only applies to making libraries for distribution.

The problem with using Typescript in a stand alone library is that you don't need a toolchain for anything other than Typescript, so Typescript is adding a level of complexity that wouldn't be there otherwise.

I've actually considered using JSDoc instead of typescript the same way myself, though for now, I'm sticking with typescript because most of the places I'm using it, there's already a toolchain in place.

erics
Автор

Simply put: a genius you are sir!..
"Benefits of the types safety, and non of the drawbacks, beacuse its just Javascript"...
😌

abiodundacosta
Автор

Why can't you fiddle with TS library in your node_modules? I mean you can change the distribution JS files still right? And if needed you need to change the .d.ts files too, yes that's a bit of a pain.

dan-kndm
Автор

How do you reuse a JSDoc type definition? Do you type it again?

nvictorme
Автор

Users don't have access to video description in YouTube Shorts, post all usefull info (like the full vid link) in a pinned comment :)

romaindurand
Автор

I knew this from the start, I was wondering why you kept moving towards typescript

roastgg
Автор

I am really suspecting Svelte is dropping TS in favor of "native" types, as it is being worked on in the javascript proposal.

erickmoya
Автор

Using Sveltekit for the first time to build something and I gotta say I'm not impressed with how types are handled. It tries to infer a bunch of stuff instead of allowing me to annotate my code. There's probably a good way to do it but so far it's a pain.

rumble
Автор

I like jsdoc honestly, makes maintaining code easier but that's just me because i also write Elixir backend and it being dynamic language Elixir uses ExDoc to which is similar to jsdoc

fdg-rtrk