abstract class Human extends S.Class<Human>('Human')({ name: S.String }) {
abstract title: string;
get fullname(){ return `${this.title} ${this.name}` }
}
class Doctor extends Human.extend<Doctor>('Doctor')({ specialty: S.String }) {
// title = "Dr."
}
new Doctor({name: 'Phil', specialty: 'Psychology'}).fullname // "undefined Phil"
abstract class Human extends S.Class<Human>('Human')({ name: S.String }) {
abstract title: string;
get fullname(){ return `${this.title} ${this.name}` }
}
class Doctor extends Human.extend<Doctor>('Doctor')({ specialty: S.String }) {
// title = "Dr."
}
new Doctor({name: 'Phil', specialty: 'Psychology'}).fullname // "undefined Phil"