mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
21 lines
273 B
JavaScript
21 lines
273 B
JavaScript
class SS {
|
|
constructor(name){
|
|
this.name = 'ss'+name;
|
|
}
|
|
}
|
|
|
|
class AA extends SS {
|
|
constructor(name){
|
|
super(name);
|
|
this.name = 'aa' +name;
|
|
}
|
|
|
|
aaGreet(s){
|
|
super.greet?.(s + 'hhh');
|
|
}
|
|
}
|
|
|
|
const a = new AA('jack');
|
|
|
|
expect(() => a.aaGreet('d')).not.toThrow();
|