January 1, 2026
Strict vibes, loose types
I was wrong about TypeScript part 1
TypeScript mea culpa sparks ‘any’ wars and error angst
TLDR: The author admits TypeScript can be good but shows pain points like unclear errors and the “any” escape hatch. Commenters split: some say its compile-time checks are illusions and the “as” operator enables unsafe casts, others call it a pragmatic tool—important for anyone betting on TypeScript for code safety.
The author admits part one of a rethink: TypeScript, the add-on that gives JavaScript “types,” isn’t perfect—but can shine with careful setup. Cue the comments: hutao dropped the mic reminding everyone that TypeScript’s checks live only at compile time—like a spellchecker that doesn’t read the book—so your function can claim anything and TypeScript nods. Error handling sparked outrage too: folks mocked code that can explode in three places without warning, dubbing it “try-catch burrito.” Rust diehards swarmed in, flexing their stricter safety rules and smugly asking, “Where’s the borrow checker now?” Meanwhile, veterans rolled their eyes: “Welcome to JavaScript; pack your runtime helmet.”
Then ngruhn swooped in with a surgical correction: the real villain is the “as” operator that lets you pretend one thing is another, turning “user as unknown as NotUser” into the day’s meme. Some defended TypeScript as a practical guardrail, not a fortress: it catches lots of mistakes early and keeps teams productive. Others doubled down on the snark: “It’s just JavaScript with :any,” they jeered, posting GIFs of bouncers letting anyone into the type club. The author promises a second part explaining why TypeScript still wins with the right settings, but today’s vibe was trust issues.
Key Points
- •This is part one of a two-part series assessing TypeScript; part two will cover configuration-based strengths.
- •The author’s background includes Java, Python, C, and Rust, with Rust’s strict type system shaping expectations for safety and correctness.
- •TypeScript lacks concrete error return types, so functions that can throw do not communicate that risk at compile time.
- •Error handling via try/catch is described as verbose and uninformative about which error occurred and where.
- •The ‘any’ type and permissive type assertions can undermine TypeScript’s safety if used broadly or improperly.