Skip to content

Instantly share code, notes, and snippets.

@FrankFang
Created August 18, 2019 13:10
Show Gist options
  • Save FrankFang/b0abf0b7e78c66d69bf83125eafc6b50 to your computer and use it in GitHub Desktop.
Save FrankFang/b0abf0b7e78c66d69bf83125eafc6b50 to your computer and use it in GitHub Desktop.
class A{
a1: number;
a2():void{
console.log('a2')
}
constructor(a1: number){
this.a1 = a1
}
}
class B extends A{
b1: string;
b2():void{
console.log('b2')
}
constructor(a1: number, b1: string){
super(a1)
this.b1 = b1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment