News for hackers. Stuff that matters.
Re:The Frontend Treadmill by nine_k on Thursday March 20, 2025 @02:56PM (#43427441)
Plain HTML and plain CSS (well, maybe with SASS) are pretty great.

Plain JS loses much to plain Typescript though, to my mind.

Re:The Frontend Treadmill by datagram on Thursday March 20, 2025 @05:12PM (#43429047)
It's not too difficult to use the TypeScript type checker on JS files, so it's possible to reap most of those benefits without having to introduce a compilation step.
Re:The Frontend Treadmill by jrajav on Thursday March 20, 2025 @08:35PM (#43430662)
In my experience, most of the benefits of Typescript come from type-checking across call boundaries, the point where type-related bugs are most likely to be introduced due to each side of the call often being in different locations and contexts. And you can't get those benefits without explicitly typing function parameters.
Re:The Frontend Treadmill by HJain13 on Thursday March 20, 2025 @09:55PM (#43431112)
If you really don't want the compilation step; you can use JSDoc and get almost the best of both worlds (not everything in TS is supported by JSDoc but most essentials are)
Re:The Frontend Treadmill by le-mark on Friday March 21, 2025 @08:09AM (#43434669)
Is there a way to use typescript without pulling in all of npm? That’s the deal breaker for me, maybe others as well.
Re:The Frontend Treadmill by nine_k on Friday March 21, 2025 @02:26PM (#43439332)
Yes. E.g. bun [1] consumes typescript directly.

The current canonical TS compiler and language server are both written in JS/TS and run on Node (even though there's an ongoing effort for rewriting things in Go). They are relatively compact though; IIRC installing the Rust compiler or the Haskell compiler takes more space.

[1]: https://bun.sh/