Skip to content
Advertisement

Tag: class

TypeScript static classes

I wanted to move to TypeScript from traditional JS because I like the C#-like syntax. My problem is that I can’t find out how to declare static classes in TypeScript. In C#, I often use static classes to organize variables and methods, putting them together in a named class, without needing to instatiate an object. In vanilla JS, I used

Does JavaScript have classes?

A friend and I had an argument last week. He stated there were no such things as classes in JavaScript. I said there was as you can say var object = new Object() He says “as there is no word class used. It’s not a class.” Who is right? Edit: July 2017 JavaScript classes introduced in ECMAScript 2015 are primarily

Advertisement