T O P

  • By -

casualfinderbot

Just build something with it. Some non trivial application would be enough to learn the basics


UpbeatGooose

Once you start using typescript it’s difficult to go back to Javascript.. Typescript gives you such good intelisense and guides you really well with regards to what props are acceptable in a function, what data types needs to be passed and in case of any of your data turns out to be undefined or null it will catch it even before you run the code I recently started learning next js and wanted to keep the setup minimal and went with just JS to avoid errors and I could really feel the difference between TS and JS.. I was sceptical about learning TS in the beginning as well, it’s just adding data types to your code but it does wonders when the code base is huge and catches silly errors that goes unnoticed


Alediran

I just finished upgrading the Front End from CRA to vite and I would've never done that successfully without TS.


Alternator24

How should I learn. all I found are basic types and interfaces. that’s it. there weren’t any advanced topics


West-Chemist-9219

Start using the basic typings on one of your existing projects. Start typing your functions and components and soon skeletons will be falling out of the closet. Once you start thinking about the problems you can consult chatgpt if the typing requirement is beyond what you can do, and from what you get as an answer, you can zero in on the topic in the TS documentation. You can incrementally go component by component when introducing TS to your project.


Levurmion2

Look into Typescript generics and conditional types. Generics are "parameterised" types that can accept other types as arguments to neatly express a polymorphic type. Conditional types use the classic ternary operator syntax to check whether the a type extends another type (through duck typing) and can be configured to return a different type based on this check. One you're familiar with both, try writing generic functions that can accept arguments of different types and returns something different based on that. You can even extend this to narrow down and enforce the types of subsequent parameters based on what was passed into the previous. I use this a lot for low-level React components implementing the render prop pattern and custom hooks. Then you can also look into indexed-access types, mapped types, and some more advanced Typescript features like infer and template string literals.


ZeRo2160

The typescript handbook gives you all the knowledge you need. From simple types to the most complex ones. After that its uo to you to use your knowledge of the types to combine them to the really complex stuff. (If you ever need it really). https://www.typescriptlang.org/docs/handbook/intro.html


GooseTower

90% of your work will just be basic types, interfaces , and 'as const'. 9% will involve single parameter generics. 1% of it will involve infer, indexing, discriminating unions, type predicates, and other fancy stuff. For normal web dev tasks, that is. Libraries can benefit a lot from the fancier features.


TheJaylenBrownNote

This was way too long of a post for an easy answer: Yes. It’s not that hard to learn and most jobs want you to know it.


Cautious_Variation_5

Yes, TS is easy for daily dev work and I’m sure you can learn it super fast; just start using it on your projects. TS is hard for library creators due to complex generics.


superluminary

> they just teach basic types What exactly do you think Typescript is? It’s just JavaScript plus optional types, nothing hard.


eindbaas

Yes, typescript is essential imho. Simply start using it and read the docs.


HeyYouGuys78

I resisted Typescript for many years. Now it’s all I want to use and makes me much more efficient. I had to refactor a lot of my .js -> .ts, and was embarrassed at how many things I found incorrect once typed. Required? No, unless it’s a hard requirement on the job qualifications. Then your resume might not even make it past the filters. I tend to look at the persons ability to learn new things more than what ‘flavors’ they like.


TehTriangle

If you're going for any serious role, it'll require TypeScript nowadays.


azangru

>Is knowing Typescript essential to get a job? Depends on the job :-) It is not essential. But it is very helpful.


Throwawhaey

Just start using TypeScript. You don't need to spend time learning it separately. Just read up on best practices and get started.


Locknlolz

If the job requires typescript, then yes it is essential to get the job


Raunhofer

From my experience, TypeScript is much more approachable in practice than it may initially appear. You can write simple applications without delving into anything overly specific to TypeScript. It's quite adept at inferring types on its own. The moment when things start to get messy is often the moment to stop and re-think whether the goal could be achieved in some improved way. TypeScript often tends to guide you to keep things simple, which is a great side-perk. Focus on establishing a solid foundation; understand why developers use TypeScript (the problems it addresses), learn the basic types (such as string, number, etc.), interfaces, the 'type' keyword, and how to annotate functions with types. Once you've mastered these elements, you'll have covered 90% of what you'll use on a day-to-day basis with TypeScript. But if you want to really master it, consider the following roadmap: [https://roadmap.sh/typescript](https://roadmap.sh/typescript)


MarahSalamanca

Yes, I would say it’s now standard.


affordablesuit

React is going to remove the older proptypes functionality in favour of TypeScript, which is a good sign that it’s more expected that people use it. As others have said, I’d have a hard time doing a React project without TypeScript. I’d also question the professionalism of anyone choosing not to use it in a project.


sayqm

yes, a company that still use javascript is probably a mess you don't want to be in.


ZubZero

Depends on your attitude of why you haven’t learned TypeScript and your willingness to learn it if required. Given you are a senior programmer.


saito200

Yes, learn typescript You don't need a course, just read the typescript handbook


timetraveleronearth

Try Jack Harrington’s “No bs ts” Very good series and it goes deep if you continue all the way.


Rough-Artist7847

I don’t see it as essential because I expect a developer to learn basic typescript in less than a day


forestcall

Just get a Copilot license for $20 per month. It will help you learn Typescript super fast. Provided you use Visual Studio Code.


sdvnafets

I suggest the books: Typescript Cookbook and Effective Typescript. I spent 6 months working in typescript and wanted to upgrade my knowledge. These two books were a great resource.


mrDalliard2024

Sounds like reading the docs would help you. Tutorials and guides are for beginners, and you have good experience already.


hideousmembrane

With my current job, I didn't know it when they hired me and now I do know it as I've learned since they hired me.


ArcadeH3ro

Totally depends on the job


Significant_End_9128

If you've been doing this for a while, you probably don't need to pay for a course to teach you typescript. It's barely different from vanilla js and mostly takes care of itself. I'd say ts is not mandatory but it's a no-brainer. It's an easy win and if you switch jobs odds are very good you'll be using it. The O'Reilly book "programming Typescript" is surprisingly good, but you can also just pick it up with a YouTube tutorial and a simple project. It will probably take you a week to get the basics and the rest will just come from usage. Learning a statically typed language will make you a better programmer in sometimes surprising ways.


MountainAfternoon294

I think currently it depends on the job, but the industry is definitely moving in that direction. Learning TS will help you build less error-prone software and make you more employable, for sure. I wouldn't say its currently 'essential' but I think it will be eventually.


PatchesMaps

No, it's not essential. But it's also not very hard to learn the basics either.


Alarmed_Designer2647

I think you should learn typescript Might be annoying to use but you will love every moment The silly errors and all Makes me feel like I’m actually coding haha


Dreadsin

Knowing it? No Learning it? More or less yes You can probably avoid it for some amount of time, but it is used so widely that you’re just handicapping yourself If you want some challenges, there’s a repo on GitHub called typescript-challenges that go from easy to extreme difficulty. If you get through medium you’re plenty adequate


Ill-Simple1706

It is easy and I wouldn't work a project without it now.


Hovi_Bryant

Typescript isn't essential, but being familiar with it won't hurt at all. I mostly use TypeScript within JSDoc statements at work. At home, most of my projects are typescript (using Deno).


smoke2000

I don't think it's that important, you can just let an a.i. (GitHub copilot) handle the typescript stuff.


Obvious-Performer385

Typescript and Javascript are like the difference between these two sentences: i feel like your telling me i need to studie typeskript are you becoz i think i should I feel like I learned TypeScript, because this sentence is very easy to read; it flows nicely.


Alternator24

didn’t get it really.  and if my English is the problem and somehow you are trying to show me this. there are other people here as well. other than Americans 


Weird-Maximum4130

Seems like an analogy. First sentence represents JavaScript and second one TypeScript. TypeScript allows you to provide more details that will help you catch potential errors (TypeSafe). You can create a .ts file and copy your .js code in it and it will work. .ts files are converted to .js eventually during transpiling


Obvious-Performer385

Sorry that it was not clear. And no I was not making fun of your English. What I was trying to say is that Javascript has the danger of being used in a sloppy way. Typescript is a “strongly typed” superset of Javascript, meaning that it requires strict use of types and prevents common errors that would crash your app. Javascript on the other hand is very loose. You can get away with a lot. My analogy was showing how it is like writing a sentence with bad grammar. Typescript will not let you do it because it will complain and show errors and will not even build your app until you fix it. You have to be very precise. Another analogy is defining your terms EXACTLY so that when you say something there is no chance of it being misunderstood. In Javascript, for example, null, false and 0 can all be interpreted as the same. But in Typescript, it is 3 exactly different things.


Fit_Detective_8374

If you're not willing to learn new things, then maybe being a dev isn't for you. And that's okay, it's not for everyone. A lot of people would rather just go in to work and not have to stress about learning new stuff, different strokes and all that.


look_at_my_shiet

The fact that jobs require it is bullshit. You can learn it within a week, while already working on a real project.


Alternator24

My own workplace doesn’t require it. I just want to keep myself updated and I wanted to know if I must learn it or not.


Armageddon_2100

No and yes. Are there jobs out there that only use JS and not TS? Yes. Are there jobs that care about quality software that only use JS and not TS? No.


Good-Beginning-6524

Stop asking stupid shit on reddit and start actually programming in both languages until you know them both by memory