Suppose I have a pure abstract class (that is, an abstract class without any implementation):
abstract class A {
abstract m(): void;
}
Like in C# and Java, I can extend the abstract class:
class B extends A {
m(): void { }
}
But unlike in C# and Java, I can also implement the abstract class:
class C implements A {
m(): void { }
}
How do classes B
and C
behave differently? Why would I choose one versus the other?
(Currently, the TypeScript handbook and language specification don't cover abstract classes.)