File tree Expand file tree Collapse file tree
tests/baselines/reference Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ //// [superCallWithCommentEmit01.ts]
2+ class A {
3+ constructor ( public text : string ) { }
4+ }
5+
6+ class B extends A {
7+ constructor ( text : string ) {
8+ // this is subclass constructor
9+ super ( text )
10+ }
11+ }
12+
13+ //// [superCallWithCommentEmit01.js]
14+ var __extends = ( this && this . __extends ) || function ( d , b ) {
15+ for ( var p in b ) if ( b . hasOwnProperty ( p ) ) d [ p ] = b [ p ] ;
16+ function __ ( ) { this . constructor = d ; }
17+ d . prototype = b === null ? Object . create ( b ) : ( __ . prototype = b . prototype , new __ ( ) ) ;
18+ } ;
19+ var A = ( function ( ) {
20+ function A ( text ) {
21+ this . text = text ;
22+ }
23+ return A ;
24+ } ( ) ) ;
25+ var B = ( function ( _super ) {
26+ __extends ( B , _super ) ;
27+ function B ( text ) {
28+ return
29+ // this is subclass constructor
30+ _super . call ( this , text ) || this ;
31+ }
32+ return B ;
33+ } ( A ) ) ;
Original file line number Diff line number Diff line change 1+ === tests/cases/compiler/superCallWithCommentEmit01.ts ===
2+ class A {
3+ >A : Symbol(A, Decl(superCallWithCommentEmit01.ts, 0, 0))
4+
5+ constructor(public text: string) { }
6+ >text : Symbol(A.text, Decl(superCallWithCommentEmit01.ts, 1, 16))
7+ }
8+
9+ class B extends A {
10+ >B : Symbol(B, Decl(superCallWithCommentEmit01.ts, 2, 1))
11+ >A : Symbol(A, Decl(superCallWithCommentEmit01.ts, 0, 0))
12+
13+ constructor(text: string) {
14+ >text : Symbol(text, Decl(superCallWithCommentEmit01.ts, 5, 16))
15+
16+ // this is subclass constructor
17+ super(text)
18+ >super : Symbol(A, Decl(superCallWithCommentEmit01.ts, 0, 0))
19+ >text : Symbol(text, Decl(superCallWithCommentEmit01.ts, 5, 16))
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ === tests/cases/compiler/superCallWithCommentEmit01.ts ===
2+ class A {
3+ >A : A
4+
5+ constructor(public text: string) { }
6+ >text : string
7+ }
8+
9+ class B extends A {
10+ >B : B
11+ >A : A
12+
13+ constructor(text: string) {
14+ >text : string
15+
16+ // this is subclass constructor
17+ super(text)
18+ >super(text) : void
19+ >super : typeof A
20+ >text : string
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments