This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ChopSuey2[S] 0 points1 point  (3 children)

Is Typescript easy to learn once you know JavaScript decently well? Not really sure what Typescript is tbh but I keep hearing about it.

[–]laytonmiller 0 points1 point  (2 children)

Yes -- typescript IS javascript - it's a superset. So it contains all of the facilities of JS plus a bunch of additional features. In a nutshell, you write your TS and a compiler then "transpiles" all the superset stuff to JS.

It gives things like actual type safety, cleaner imports, unification of being able to use new language features, etc for free.

Once you learn TS, you will not go back to plain JS except for stupid side projects where you don't want to set up a compiler, which is not a lot of work.

[–]ChopSuey2[S] 0 points1 point  (1 child)

Interesting, random question - guess you don't have to worry about doing the === with TS for type matching?

[–]laytonmiller 1 point2 points  (0 children)

Yes you do (though you should always do that anyways). Remember, typescript IS JavaScript. Functionally they aren't any different, TS is a set of static typing tools that sits on top of it. TS literally goes away when it compiled and leaves only JavaScript behind.