If It Ain't TypeScript It Ain't Sexy

If It Ain’t TypeScript It Ain’t Sexy

TypeScript is taking the web by storm. Here’s what you should know.

adamtll

But did you end up getting a jeep?

David Neal

It’s on my // TODO list. Maybe someday! :slight_smile:

bhurlow

you can add Next.js and Jest to the “we are re-writing everything in typescript” train

David Neal

Whoa :smiley:

Deepak Seth

That Reminded me of the time I had Mustang Fever :slight_smile:

Sergey Potapov

I like TS it eliminates some classes of errors that can happen in JS (of course not all).
However, if you enjoy type safety and considering writing backend in TypeScript, you should probably consider other type safe languages (e.g. Haskell, Rust, Kotlin, whatever else). Apart from type safety you can also enjoy much better performance.

George Steel

Flowtype is also worth a look, its type system is even more powerful then typescript, with features such opaque types (which can detect XSS vulnerabilities) and variance (allows for immutable fields and makes subtyping easier to deal with).

c.press

We are all dying to know when you do try TS. Maybe you can make a Speaking Engagement out of it :slight_smile:

Stuart

TS got popular after Microsoft, the creators of TS, bought Github. Now you’re seeing it used all over the place.

Jeremy Karlsson

I really enjoy using the TypeScript linter for type checking regular JavaScript via inferrance and addition JSDocs. :slight_smile:
Example here, with an npm command for linting the types: https://github.com/enjikaka…

derekgreer

Great post, David. I wrote a similar post about 2 1/2 years ago after suggestions within my team at the time to adopt TypeScript (https://lostechies.com/dere…. My conclusion back then was that there wasn’t enough community adoption to warrant the investment. I’m sure my conclusions would be somewhat different were our team to evaluate its adoption today. I did read an interesting and very lengthy article recently called the TypeScript Tax (https://medium.com/javascri… in which the author, Eric Elliot, recommends that TypeScript not be used on large-scale projects which I’d recommend checking out.

David Neal

Hey Derek! Yes, I believe I put a link to Eric’s post somewhere in my article. There’s definitely reports both good and bad on the long-term use of TypeScript on large projects. Like any other technology, “it depends” on so many factors that it is no guarantee to be overall beneficial. I had someone tell me earlier this week they’ve been using TS on their team for a couple of years, and they wish they could just go back to pure JavaScript.