V
V
Vitaly2016-01-14 16:23:47
JavaScript
Vitaly, 2016-01-14 16:23:47

Is it worth learning TypeScript now?

Hello!
I'm slowly learning JavaScript (+ Node.js, Angular and Cordova).
I liked angular , but its second version is written in TypeScrip .... So I think it's worth learning TypeScript + angular 2 now? How quickly will it become, so to speak, relevant? I want to create projects in Angular, but Angular 2 is completely different, now spend time deepening into Angular 1x or Angular 2 + typescript? And if there is good / understandable documentation on TypeScript and Angular2 (it is possible separately and preferably in Russian)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey, 2016-01-14
Protko @Fesor

but the second version is written in TypeScrip

What difference does it make on what it is written on, if you can write on whatever you want.
Let's be clear. TypeScript is ES6/ES7-stage1 + type information. That is, if you know ES6 / ES7-stage1, then you automatically know TypeScript (only information about types and some nuances will be added, but in general they strictly follow the standard).
That is, this is valid TypeScript:
class Foo {
    bar = 'default property value';

    constructor(untypedArg) {
       this.foobar = untypedArg;
    }
}

While it's valid TypeScript code, it's also valid code from an ES point of view (taking into account drafts that are in stage1, like properties for objects )
It's not Dart, which is a different language. It is an add-on to JS and nothing more, except for the possibility of an (optional) type declaration - there is nothing else there. But for large projects, this information allows you to get rid of a bunch of bugs.

K
Kostya Gorozhanov, 2016-01-14
@kgorozhanov

I advise you to master the first Angular at a good level. But it's never too early to learn. It will become relevant as soon as the stable version is released, and in vacancies they will require 5 years of experience on Angular 2))))))

A
Alexander Kondaurov, 2016-01-14
@kondaurov

Surprisingly, no one said that you can write typescript using angular 1.x.
typescript is the same js only with annotations, typing, inheritance, interfaces and, most importantly, modules. Without these goodies, I don’t even know how to make reliable applications. I regret that time was killed with pure js and coffee script.
All the functionality that was before is now just as easily written in ts, I don’t sacrifice anything, it just takes time to smoke the documentation.
You can use mixins (aka traits), mix classes and be glad that there is no copy-paste code, I don’t know how to do it on something else.
You will also need to deal with grunt (gulp), set up tasks for translating ts to es5. See file upload order. Need to spend more time on this
There are a lot of articles about how to write (although all eng):
https://gist.github.com/esfand/9569523
www.codeproject.com/Articles/888764/Getting-starte...

S
sanex3339, 2016-01-14
@sanex3339

Costs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question