TypeScript is a super set of JavaScript, you use TS syntax in design-time and tsc to JavaScript code for runtime. (Just like most people us JS2015+ in design-time, babel to JS5 for runtime)
Classes
the TS class is just like ES6+ class;
the JavaScript code is not a ES6+ class, but a ES5 function extending its prototype.
Private properties
today's status: "Public and private field declarations are an experimental feature (stage 3) proposed at TC39".
ES2 (1998) defined the reserved words: class, private, public, etc.
TypeScript uses "private" in class was a natural move.(unfortunately, not same as the es2019). But no break changes for TS developers, you don't hear them cry.
Typescript is not JavaScript
Of course you have errors for the factorial function (if using default tsconfig), that's the most important job TS does -- static type-checking.
The creator of Typescript knows nothing about programming
No comment. ( subjective topic)
People only use Typescript because they are used to OO languages
Not exactly, most of TypeScript (Object Oriented) features are being added to JS.
People use TS mainly because its static type-checking feature.
You can't debug Typescript
Why! I debugged TS in my first TS project.
Babel is so much better
overlapped in code trans-pile, but different others
Babel transforms JS code (high version to low version)
Babel uses TS (plugin) to transforms TS code
Babel uses Flow to transform Flow code
Typescript is only used in Angular
Yes, Angular is only framework forces application users to use TS syntax;
(you can use Angular UMD package in JavaScript, not popular usage)
Flow is better
Subjective. Flow is not standard JS either, it still needs to be transpiled.
Difference Flow vs TS, flow marks inline, but TS marks the extension.
You shouldn't use Typescript
my personal opinion:
use JavaScript, if you are application developers.
use TypeScript, if you are framework/library/package developers. (when building, deliver cms, ems, umd, whatever to your application users, just like Google material-ui team, VUI, AirBnb, firebase etc.)
my comment about TypeScript
pros: improve JavaScript code robustness, productivity (for experienced)
cons: learning curve high.
remember: TS is for static syntax type checking.
Disagree all the points.
Modules:
TypeScript is a super set of JavaScript, you use TS syntax in design-time and tsc to JavaScript code for runtime. (Just like most people us JS2015+ in design-time, babel to JS5 for runtime)
Classes
Private properties
today's status: "Public and private field declarations are an experimental feature (stage 3) proposed at TC39".
ES2 (1998) defined the reserved words: class, private, public, etc.
TypeScript uses "private" in class was a natural move.(unfortunately, not same as the es2019). But no break changes for TS developers, you don't hear them cry.
Typescript is not JavaScript
Of course you have errors for the factorial function (if using default tsconfig), that's the most important job TS does -- static type-checking.
The creator of Typescript knows nothing about programming
No comment. ( subjective topic)
People only use Typescript because they are used to OO languages
Not exactly, most of TypeScript (Object Oriented) features are being added to JS.
People use TS mainly because its static type-checking feature.
You can't debug Typescript
Why! I debugged TS in my first TS project.
Babel is so much better
overlapped in code trans-pile, but different others
Babel transforms JS code (high version to low version)
Babel uses TS (plugin) to transforms TS code
Babel uses Flow to transform Flow code
Typescript is only used in Angular
Yes, Angular is only framework forces application users to use TS syntax;
(you can use Angular UMD package in JavaScript, not popular usage)
Flow is better
Subjective. Flow is not standard JS either, it still needs to be transpiled.
Difference Flow vs TS, flow marks inline, but TS marks the extension.
You shouldn't use Typescript
my personal opinion:
my comment about TypeScript
pros: improve JavaScript code robustness, productivity (for experienced)
cons: learning curve high.
remember: TS is for static syntax type checking.
check this really big team experience sharing
youtube.com/watch?v=P-J9Eg7hJwE
I will write property about ts. Hope you like that as well.
It's satire. (I don't really get it though)
a bad one