class Foo { private _name : string ; constructor ( name ) { this . _name = name ; } getName ( ) { return this . _name ; } } class Bar extends Foo { getName ( ) { return super . getName ( ) + ' Doe' ; } } var bar = new Bar ( 'John2' ) ; console . log ( bar . getName ( ) ) ;