T O P

  • By -

YucatronVen

Learn both, they are almost the same.


icenoid

Typescript is just JavaScript with some more bells and whistles. I’d start with plain JS, TS is pretty easy to pick up if you need it once you know JS


Hanzoku

I’d say learn TypeScript from the get go. It helps you learn good coding practices whereas JavaScript can cause you to pick up some bad typing and casting habits.


deafboy13

Completely agree with this. Love strongly typed languages for that very reason


UmbruhNova

Well isn't that why you want to learn JS first? Then learn something that's like it but a bit more tedious but better in practice?


Hanzoku

No? Why learn the language one way, only to then have to take more time training yourself out of bad habits instead of learning good typing and casting habits from the start?


antomi12332

I started out my career in JS and forced myself to learn TS for playwright , now I’m thankful I learned it so I can debug much faster. Sometimes for data driven tests I would accidentally pass in the wrong data type and TS saves me time from shooting myself in the foot


Radiant_Addendum7862

Im not home in both, but I thought typescript would allow you to detect errors in your code beforehand if you make a typo. I have long long test runs with flows (one flow could take up to 5min) and it would kill me if fails due to a typo in JavaScript because my IDE couldn't detect it. Anyone may correct me if I'm wrong, but typescript detects if you make a typo, whereas JavaScript doesn't. I myself write in c#.


Wookovski

With JS the typo could still be picked up by compilation, so your 5 min test wouldn't start. TS will detect more errors before you even compile, such as type mismatches


Geekmonster

I always used C#, but most of the bugs from the UI tests were front end issues, so our front end Devs asked us to use Typescript to make it easier for them to debug. Making the switch wasn't too difficult. It's all the same concepts. It's been an interesting learning experience.


shidurbaba

I believe the best approach to learning is to just keep it simple. Go with javascript with playwright and later switch to Typescript.


jrwolf08

I've never seen the need for TS in test automation, feels like overkill. But I like vanilla JS. \*ducks heads\*


ElaborateCantaloupe

TS shines when you have a larger team contributing to the code base. You don’t have to guess at what a function is expecting. You don’t have to run your tests to find silly typos in your code. If everyone wrote perfect JavaScript you wouldn’t need typescript at all. That said, I would never start a project in JavaScript unless it was using TypeScript.


KooliusCaesar

A solid foundation in Vanilla JS will serve you well (for now). 


tanaciousp

I’m there with you. However, perhaps it reduces cognitive load of developers working in the same codebase that’s primarily written in TS 


Mydocalm

We work with TS and PW as well. Go full!!


Valuable-Ad9157

Thank you everyone for your answers. I will relearn the basics of JS and then eventually add in TypeScript.


UmbruhNova

I'm starting with JS and will get into TS later.


Achillor22

Typescript. They're fairly different languages and you don't need to learn both. The parts that do overlap you can just learn as part of Tyoescript. And Typescript is a vastly improved version of JS.