Created
August 18, 2019 13:10
-
-
Save FrankFang/b0abf0b7e78c66d69bf83125eafc6b50 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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