Is 2019 the year of TypeScript?

Nick Taylor on January 16, 2019

Also published at iamdeveloper.com on Jan 16, 2019 Photo by NordWood Themes on Unsplash This comment in the Jest repository, https://github.com/f... [Read Full]
markdown guide
 

I'm one of the maintainers for React's types, and I'm writing a post series on how TypeScript works with JSX. Hopefully this'll clear up some of the magic smoke behind how JSX typing works :)
dev.to/ferdaber/typescript-and-jsx...

 
 

Might as well call it hypescript at this point. It seems like it’s all the rage.

Probably a good sign that an all-the-rage thing in JavaScript is a tool that should fundamentally help write more sound software across the board, and one that’s been around long enough to become pretty stable I’d imagine.

 

Hmmm HypeScript could have some fun typings in that language...

const newVariable: ohYeahStrings!;
const anotherVariable: awesomeNumber![];
const thirdVariable: bestObjectEver!{};

export everyoneIsInterestedInThisClass someClassName {};
export mostInterfaceableInterface IinterfaceName {};

I dig it!

 
 

I do believe it's all the rage right now but there are times when I see the value in a JS implementation. I still think there is not enough support for certain types and you are left either writing your own adding any to describe something. And in converse, when working on a large codebase or teams the comfort of types is very helpful.

And naturally a shameless plug for a react-native expo starter I made to solve that problem for RN.
github.com/mrtnrst/expo-typescript...

 

I'm curious as to what types you're missing as well.

I have not encountered that yet. An interesting quirk is that if you only need Type checking then you should make an interface. Interfaces are thrown out at compile time which leaves your code lighter. Classes are kept and should only be used if you actually need to instantiate an instance of that type during runtime.

 

Which are some types you think are not supported? I was interested in jumping in this TS-hype-train and things like this are good to know before :)

 

Typescript seems to be really gathering attention nowadays. I remember avoiding Angular, as I had to learn another language.. Typescript. But its that same typescript that made me take Angular as well as trying all Possibilities to use wherever I use javascript from React to Electron Js. High quality intellisense and type enforcement makes Typescript 1st class.

 

If you're in Reactland, it couldn't be easier to get started with TypeScript these days since support landed in Babel 7 and they implemented support in Create React App.

npx create-react-app your-project-name --typescript
 

To be fair having to learn Typescript AND Angular at the same time makes learning both significantly more difficult.

 

That was my exact course, and I believe that is why I am so biased toward TypeScript. I avoided so much JavaScript pain.

I definitely took courses on fundamental JS later on, because as wonderful as TS is, at some point you will break your face if you don’t understand the underlying language.

Oh yeah I LOVE TS, I just was overwhelmed with it at my first shot(I come from static typed languages but was very familiar with JS by this point), and it was annoying not knowing if my problems were TS or Angular when I tried learning both at the same time.

 

Nope. I stayed with React and Typescript. Angular's strategy felt too heavy for simple applications.

I wasn't defending angular, I don't use it either. I was saying that learning both at the same time makes both hard to learn.

 

I know a lot of people came to TypeScript from Angular 2 and on, but for me it was a different path.

We adopted TypeScript in 2015 where I was working at the time and used it with a custom front-end library. After that, I jumped into the world of FinTech with React and TypeScript. And since then all my professional React experience has been pretty much all in TypeScript. And aside from React, I've used it in node as well. Works really well there too.

It plays really well with React. You know the TS team cares about Reactland, because they added the fragment syntax fairly quickly. And it plays well with Preact too. It was a minor fix, but I had a PR go into Preact for a types issue just over a year ago. Felt pretty good about that.

 

Not exactly sure what it means that 2019 is the year of TypeScript. I worked on large projects at Microsoft and they used TypeScript exclusively on large scale systems for years. And there is a good reason it was used over vanilla JavaScript. I can't imagine not having type safety beyond 1 developer.

 

All I mean is, maybe this is the year that its adoption really skyrockets. I've been using it since 2015 and it's 🔥.

 

I've just started dabbling with TypeScript and..
A simple change helped me to reduce the file size today 😉
probably because I wasn't doing Babel right 😅

But it wasn't so bad so more reason to like/move/try to use TypeScript 👍

js to ts

 

I really hope not..

Typescript, has its usecases, but without native support it is almost pointless to me.
Too much setup.

The easier debugging is nice however.

My main gripe is problably that it tends to promote large corp style OOP with bajillions of pointless interfaces and classes.

Which in my experience leads to state soup and lack of code-mutability.

 

For sure it can promote large corp style OOP. Perhaps, and I have no data for this, just my musings, is that Angular promoted this once they adopted TypeScript. DI, classes, decorators etc...

I've been using TypeScript in React and browser extensions and almost never use OOP. The only time I've really used classes in React was for components that required state. Aside from that rarely, and now that hooks are stable and able, function components would be the way to go for new work.

Having said that, OOP is not a bad thing. Just like anything, people can do bad things 😉

 

I am mostly against OOP, for a number of reasons that would longwinded and off topic. :)

I my world, the TS gains do not outweigh the layers of complexity added to all parts of the developing process from developer skills to the libraries and build systems we use today.

It is unnecessary for most things, so why bother with it?

 

TS is something I have been looking to learn for months/years but haven't really started with. I am sure it is same w/ many other people. They are hitting the tipping point now. Can't wait to give it a try. 😁

 

2019 is going to be a year of typescript for me for sure. It was a growing interest throughout 2018 (along with testing) and I finally might get a proper project in TS. My hopes are for higher code quality and predictability, and for the benefits of code editor suggestions :)

 

If you're an Angular developer you'll be pretty familiar with it already ;)

 

The main problem with typescript is that it is becoming a hack upon another hack. The types get very long and the compiler has problems with them (I was able to let the type checker run into an infinite loop aka a stack overflow).

Typescript the idea is great, but the execution is lacking
Still worlds better than untyped js though

 

Or is 2019 really the year js falls out of the top ten...because typescript bum bum buuum

 

well, turns out, if you don't know javascript, your typescript will suck too. oh yeah, and all your doing is writing a superset of JS that literally transpiles back to JS in the first place, so it would be REALLY weird for typescript to displace JS, as ultimately that is what you are actually making with typescript...

 

On a morning from a Bogart movie

In a country where they turn back time

You go strolling through the crowd like Peter Lorre

Contemplating a crime

She comes out of the sun in a silk dress running

Like a watercolor in the rain

Don't bother asking for explanations

She'll just tell you that she came

In the year of the typescript

 

I've recently started to write in TypeScript while creating my first Angular application and I love it. Being able to use types, classes, interfaces etc makes everything so much easier!

 

TypeScript is what makes Angular 2+ enjoyable for me. I'm seeing it added to everything lately. A good sign indeed.

 

Big fan of TS. Been using it for years maintaining Angular apps and have even picked up the habit of using it for larger-than-small JS projects.

Didn't get around to trying Flow.

 
 

This was literally my first thought when I read the title of this article 🤣🤣🤣🤣🤣

 

That was literally my first thought when I read the title 🤣🤣🤣🤣

 

We're gearing up to adopt it where I work, so very possibly yes.

 

If only TypeScript finally had newtypes.
At least in the form of flow's Opaque type aliases.

 

TypeScript is the one reason that made me start writing Frontend code as a Backend developer.

 

This is like a TV advertisement, not a tech article.

 

@swyx 😉

 

It looks like even yarn is migrating to TypeScript.

 

TypeScript strict syntax makes it scalable. So, big projects in TypeScript reduces a lot of pain in the ass.

code of conduct - report abuse