Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

class in JavaScript Vs Typescript

I read on this ECMAScript page that 'class' is part of JavaScript. On this page about TypeScript, I see the 'class' is available in Typescript too.

My question is, the right approach to develop JavaScript applications FOR FUTURE is to take advantage of (a) the Object Oriented features in JavaScript and the features that will be availablein EMACScript 7.0 or (b) use libraries like TypeScript

like image 391
wonderful world Avatar asked Feb 11 '23 09:02

wonderful world


1 Answers

My question is, the right approach to develop JavaScript applications FOR FUTURE is to take advantage of (a) the Object Oriented features in JavaScript and the features that will be availablein EMACScript 7.0 or (b) use libraries like TypeScript

Either is fine. Depends upon if you want type safety.

If not there is stuff like babeljs. https://babeljs.io/

If yes then use typescript http://www.typescriptlang.org/

like image 184
basarat Avatar answered Feb 12 '23 23:02

basarat