# 抽象クラス(abstract)

# TypeScript

ある

abstract class Creature {
  public abstract get canRun(): boolean;
}
class Dog extends Creature {
  public get canRun(): boolean {
    return true;
  }
}
// const c = new Creature(); // Error
const d = new Dog();
d.canRun // => true

[ 📩 ご意見 ]