TS seems pretty easy to get started with. Do you guys think it’s worth doing some projects in Typescript even if the job market is much smaller?
One concern I have is I “get used” to typescript’s improvements and then have a 2nd set of pains having to go back to regular JS once I get a job
It’s a superset of JS, so all JS knowledge applies. Looking at it that way, you’d be becoming comfortable with something that sits on top of JS – it doesn’t replace that knowledge. And it is on a steep upward trend, so the likelihood of using it in a job is fairly high, and will get higher. I would say strong yes on learning it: it’s not world-changing, but it’s very useful and it isn’t going away anytime soon.
TypeScript usage has been growing exponentially and it can now be considered a major language (in 9th place just behind PHP - https://insights.stackoverflow.com/survey/2019#technology).
I believe experience with TS will only increase in value over time, I see no reason to choose JS over TS, except for tiny use-cases where the overheard of developing with TS isn’t worth it. (most projects are bigger than this)
I also believe learning Typescript will only help existing JS skills, along with providing a better developer experience. I’d compare it with learning to drive a motorcycle, and worried that you will forget how to ride a bike. You wont forget how to “use JS” with typescript.
One of the improvements you might get used to is the ability to use basically any experimental JS feature in TS. To utilize this in JS, you would need something like babel, or work with only modern browsers, but this isn’t a TS specific issue as the same could be said with different versions of JS.
The type safety of TS will make writing code easier, but hard to maintain and scale JS.
I personally recommend using TS for all projects at any scale for any reason tho, so if you just don’t write JS anymore no more problems
Typescript isn’t so hard that it takes a learn that you have to commit a tonne of time to learning it. You can just start a new Ts project and keep using it like Js even if you don’t know all the features.
The strength of Typescript is that its self documenting, which is perfect if you’re coding on a team and helps you write cleaner code if you’re by yourself.
It’s nice to know but not really a game changer. Some people love it and some don’t think its worth the trouble learning since they already know Js.
Also I think it’s worth it to try out new languages even if you don’t plan to use them.
You can also evangelize the usage to your cofworker because there are benefit to use Typescript. Js code can be notoriously difficult to debug, and Typescript helps addresses and eliminate some of the common error.
It literally1 makes me cry when people (mainly developers) use “exponential” to mean “fast and maybe accelerating, but probably not even quadratic, much less exponential”.
But yeah, typescript does look to be getting ever more popular. My current job requires it, though it wasn’t a prerequisite to get hired (I hadn’t used it previously). I’d say it’s definitely worth learning, and the tooling around it provides a lot of nice conveniences.
As for whether it’s hard to go back to plain old JS, your mileage may vary. It won’t be difficult conceptually, due to JS being a subset of TS, but it might make you miss some of the nice features.
 Yes, yes, irony intentional.
Why? The meaning of a word is determined by its common usage, not just by its technical definition in a specific domain. The dictionary contains both.
Fair point. Merriam-Webster agrees with you. I’m literally eating my words right now.
I would look at it like this:
If you go to a job interview, and know TypeScript, you are likely in a better position than if you just know plain JS. It’s something to talk about, and the company might actually want people with that skill.
If you go to a job interview and don’t know TypeScript, then you may be disadvantaged if the company is looking for that skill.
Knowing TypeScript doesn’t really seem to disadvantage you in any way except for being a minor pain if you have to go back to plain JS.
Thanks, I was already inclined to convert after the other responses but you sealed it for me.
Going through the webpack docs it honestly seems the webpack setup will be harder than actually using basic typescript.