#Big projects are ditching TypeScript by Fireship

33 messages · Page 1 of 1 (latest)

primal pilot
marble bolt
#

Love to see it

latent lark
#

Nice video I like fireship but ts still seems good

primal pilot
#

those are the 'big' projects he's talking about here

primal pilot
marble bolt
#

Bahahaha kind of

#

I just don’t like overcomplicates typescript

steep fiber
#

yet to watch it, but I presume they're discussing about Svelte? hmmGe

cosmic nebula
#

Turbo too

quaint shuttle
#

typescript is really annoying sometimes, specially if you're a library author, it can become or really cryptic or super frustrating depending how much you go into abstractions and how much variety you need to allow for your users and how much you adhere to the mental models that it forces into you (the more you lean into functional stuff the more problems you'll find)

that being said, the benefits outweigh the cons, for now...

and is not only about code linters and autocompletion, something I haven't seen much talk about is testing... using typescript serves as a basic testing suit without the need to add stupid "example tests" all over the place...
if you remove typescript you not only need to add jsdocs, you also have to add a whole battery test suit to even match what typescript does by default

so I get it, but I won't recommend to newbies to jump the boat because some tech influencers are making waves just yet

primal pilot
kind laurel
#

I totally respect the choice of those library authors to switch away from typescript. The time I spend adding useful types to libraries is a lot more compared to the time that I spend implementing the actual feature. I just find it very bad to see how they are doing their migration. This review on the turbo PR for removing typescript shows a lot of issues with their current approach https://github.com/hotwired/turbo/pull/971#pullrequestreview-1613489798. Just removing types everywhere causes a lot of useful information to be removed and I would find it very hard to contribute to such a project. After all it is open-source, so they should make it easy to contribute to such a project, but the way they are doing it, is just making contributing much harder. If more libraries transition from typescript to javascript, they should actually make sure that they do a clean transition, instead of just removing every : FooBar, interface FooBar and type FooBar everywhere. If they really want to rely on tests for all this now, it will probably take a lot more effort than implementing proper types for their library.

cosmic nebula
#

the issue I have is comments, like the one linked above, are from people who have not contributed to the codebase

kind laurel
#

Imo contributions are not limited to code contributions. Just explaining your opinion as a comment on an RFC or even any PR is a contribution just like writing a line of code and submitting a PR

cosmic nebula
#

I somewhat agree but it does lead to a "too many cooks in the kitchen" situation a lot of the time

kind laurel
#

Okay yeah, I see that. The amount of comments all saying the same thing on this PR makes it a bit overwhelming, especially because most of them don't add any new things on the topic. A simple 👍 or 👎 on a comment that already includes your opinion should be enough

#

Most comments on this PR are people complaining that this decision has been made without any prior communication. The PR has been merged without having the community look at it and I can understand their problem, that this is not "open-source"

#

This is an open-source library, not just source available.
There are many other open-source libraries using this library directly or indirectly.

quaint shuttle
kind laurel
#

A lot of times I see contributions from other people on libraries that they are using in their own libraries. So if you are using a library and discover a bug or want a new feature, it should not be the responsibility of the actual owners of the project to implement it for you. This is still open-source, so if I find a bug in their library as a consumer, it would be faster for me to fix it myself, than waiting for the team to prioritise it, work on it and merge it. If I would submit a PR, only the "merge" step is necessary (and review)

cosmic nebula
#

If you're a contributor, it's pretty standard for the environment/flow/development experience being different to what you'd prefer
not contributing because it doesn't use TS seems like a bit of a non issue. I don't contribute to chromium when I find a bug because I don't know c++

#

I don't like the crowd insinuation that typescript is better than JS. They both excel in different areas

kind laurel
#

Totally, that's why I am saying that I respect their decision to move to javascript. I just don't like the way they have done this

cosmic nebula
#

Oh that wasn't aimed at you, just in general

kind laurel
#

Even if i don't contribute to something, if I have to debug my application, I often have to dig into the libraries code to see what it is doing, so I would want a library that I use to be understandable.

- async function gotoPageWithFormMode(page: Page, formMode: "on" | "off" | "optin") {
+ async function gotoPageWithFormMode(page, formMode) {

without jsdoc, this line looses a lot of detail

cosmic nebula
#

that example's from a test, not from actual code. The actual codebase seems to have, at least some form of jsdoc

kind laurel
#

I can't really find those places. If i search through the whole PR, I can't find a single added line that has JSDoc. And there are enough examples from non-test code