DEV Community

Discussion on: Why using JS classes instead of Typescript interfaces?

Collapse
 
macsikora profile image
Pragmatic Maciej

Class has runtime representation whereas interface hasn't. It means that when you make a Class you get type + value constructor by "new" keyword. In other hand when you make an interface you have type but no value constructor, so you need to make the value separately.