TypeScript-Handbook icon indicating copy to clipboard operation
TypeScript-Handbook copied to clipboard

Documentation about using a class as an interface

Open raxkaynan opened this issue 9 years ago • 2 comments

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.

raxkaynan avatar May 17 '17 07:05 raxkaynan

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.

mhegazy avatar Aug 14 '17 23:08 mhegazy

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.

raxkaynan avatar May 29 '19 06:05 raxkaynan