2014-07-13 01:04:16 +02:00
//// [validUseOfThisInSuper.ts]
class Base {
constructor ( public b : Base ) {
}
}
class Super extends Base {
constructor ( ) {
super ( ( ( ) => this ) ( ) ) ; // ok since this is not the case: The constructor declares parameter properties or the containing class declares instance member variables with initializers.
}
}
//// [validUseOfThisInSuper.js]
var _ _extends = this . _ _extends || function ( d , b ) {
for ( var p in b ) if ( b . hasOwnProperty ( p ) ) d [ p ] = b [ p ] ;
function _ _ ( ) { this . constructor = d ; }
_ _ . prototype = b . prototype ;
d . prototype = new _ _ ( ) ;
} ;
var Base = ( function ( ) {
function Base ( b ) {
this . b = b ;
}
return Base ;
} ) ( ) ;
var Super = ( function ( _super ) {
_ _extends ( Super , _super ) ;
function Super ( ) {
var _this = this ;
2014-08-01 20:16:09 +02:00
_super . call ( this , ( function ( ) { return _this ; } ) ( ) ) ;
2014-07-13 01:04:16 +02:00
}
return Super ;
} ) ( Base ) ;