A
A
ali52022-02-01 12:10:20
JavaScript
ali5, 2022-02-01 12:10:20

Do I need to use TypeScript everywhere? or is it hype?

Does it make sense to use Typescript in pet projects? like created a mini game in 15 lines of code in TypeScript?
Or is it only for large projects? and in general, everything is straight without him, as if they can’t write, judging by the reviews, or is it some kind of hype or Microsoft advertising

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Anton Shvets, 2022-02-01
@ali5

Do I need to use TypeScript everywhere?

well, apparently not.
or is it hype?

No
Does it make sense to use Typescript in pet projects?

Writing in ts is stupidly more convenient, it catches simple errors right away and provides auto-completion and information about signatures.
like created a mini game in 15 lines of code in TypeScript?

as you wish, for the sake of 15 lines I would be too lazy to configure the config, but I would definitely write always on ts if it was supported by default.
Or is it only for large projects? and in general, everything is straight without him, as if they can’t write, judging by the reviews, or is it some kind of hype or Microsoft advertising

again. ts - more convenient and reliable.

M
Michael, 2022-02-01
@Akela_wolf

In pet projects, you can use what you personally like. That's why they are pet projects. Personally, I usually use in pet projects what I want to try out in practice, just to understand how to work with it. At different times it was Python, Typescript, Scala, Haskell, now it has reached Kotlin Multiplatform.
If we talk about the advisability of using TypeScript - it is. And it begins to open up on large projects, when it becomes difficult to fit all the details in your head: what, where, and what the heck is like? This is where typescript comes in handy. Including when you get confused in three objects and pass the wrong type - the javascript will fall down at runtime (and even then it may not always fall down, but only when the stars converge), the typescript will not compile.
So it is worth learning this language in my opinion. Whether to use it in toy projects, whether it will be overkill there, is up to you.

A
Anton, 2022-02-01
@karminski

About pet projects. So you go to an interview and show your JS pet project. At the same time, another candidate is interviewing with a similar pet project with TS typing. Who do you think will be preferred?

R
Rag'n' Code Man, 2022-02-01
@iDmitriyWinX

Typescript is an invention of the Americans, there is no typescript.
Well, seriously, after TS, I no longer participate in projects where it is not.

A
alekssamos, 2022-02-03
@alekssamos

Here is the simple answer. One day you can do this:

let a = 3; let b = "4";
let c = a + b; // 34

JS will run and output 34, TS won't even run.
Do you understand the difference whether it is necessary or not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question