TypeScript-Handbook
TypeScript-Handbook copied to clipboard
Documentation about using a class as an interface
Under this section: Using a class as an interface, the example shown doesn't demonstrate a class as an interface. A class as an interface should be implemented by another class using the implements keyword.
A class as an interface should be implemented by another class using the implements keyword.
not necessary. an interface declares a type, a class declares a type and a constructor function. this part stresses the type that a class declares.
I opened this issue almost exactly 2 years ago, and I was quite new to TypeScript back then. I have to agree to @mhegazy 's explanation. So I'm closing this issue now.