Opinion from me, a JS beginner: Vanilla is good enough now. If your IDE lets you type common structures like
document.getElementById("")
with shortcuts, I find no need to use a framework. Also, vanilla works better in offline projects.I haven’t dealt with a larger JS/Node Project in a while, but I like this approach to using TS features in JS.
so he does all of this because he dislikes transpiling because supposedly it makes debugging etc harder? does he know about sourcemaps?
he also says he doesnt like type information in his code, so he adda them as comments. the type information is still there, how is this an improvement?
The issue with transpiling is that the code that’s running in production is not necessarily the one that’s been tested. A source map doesn’t fix that.
Ugh? Why shouldn’t it be the same code?
Because Browsers can’t run Typescript, they run JavaScript. That’s why the intermediate conversion step isneededd.
That approach was mentioned in the video.
Tl;dw: it’s too much “type-gymnastics” when developing a library.
Too be frank, it is pretty short but your summary is on-point. I would only add, that Svelte also dropped it due to the additional compile step.
However TS can still be used in most of the frameworks including Svelte.
I wonder how Svelte’s code is built to make this tradeoff worth it. I’ve been using TS for a long time and in every project the compilation part was the shortest task in the whole build process, especially when you compare it with bundling or running unit tests.
Afaik it had more to do with another layer of abstraction then with compike time.