📅  最后修改于: 2022-03-11 14:48:34.706000             🧑  作者: Mango
// You need to mark fields and methods that are not implemented as abstract
abstract class AbstractService {
abstract someMethod(): Observable
}
// This will also force implementing classes to actually implement the methods:
// Error: Non-abstract class 'Service' does not implement inherited abstract member 'someMethod' from class 'AbstractService'
class Service extends AbstractService{}
// ok, methods is implemented
class OkService extends AbstractService {
someMethod() {
throw new Error("Method not implemented.");
}
}