=================================================================== JsFile: sourceMap-FileWithComments.js mapUrl: sourceMap-FileWithComments.js.map sourceRoot: sources: sourceMap-FileWithComments.ts =================================================================== ------------------------------------------------------------------- emittedFile:tests/cases/compiler/sourceMap-FileWithComments.js sourceFile:sourceMap-FileWithComments.ts ------------------------------------------------------------------- >>>// Module 1 > 2 >^^^^^^^^^ 3 > ^^^-> 1 >// Interface >interface IPoint { > getDist(): number; >} > > 2 >// Module 1 >Emitted(1, 1) Source(6, 1) + SourceIndex(0) 2 >Emitted(1, 10) Source(6, 10) + SourceIndex(0) --- >>>var Shapes; 1-> 2 >^^^^ 3 > ^^^^^^ 4 > ^ 5 > ^^^^^^^^^^-> 1-> > 2 >module 3 > Shapes 4 > { > > // Class > export class Point implements IPoint { > // Constructor > constructor(public x: number, public y: number) { } > > // Instance member > getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } > > // Static member > static origin = new Point(0, 0); > } > > // Variable comment after class > var a = 10; > > export function foo() { > } > > /** comment after function > * this is another comment > */ > var b = 10; > } 1->Emitted(2, 1) Source(7, 1) + SourceIndex(0) 2 >Emitted(2, 5) Source(7, 8) + SourceIndex(0) 3 >Emitted(2, 11) Source(7, 14) + SourceIndex(0) 4 >Emitted(2, 12) Source(31, 2) + SourceIndex(0) --- >>>(function (Shapes) { 1-> 2 >^^^^^^^^^^^ 3 > ^^^^^^ 1-> 2 >module 3 > Shapes 1->Emitted(3, 1) Source(7, 1) + SourceIndex(0) 2 >Emitted(3, 12) Source(7, 8) + SourceIndex(0) 3 >Emitted(3, 18) Source(7, 14) + SourceIndex(0) --- >>> // Class 1 >^^^^ 2 > ^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { > > 2 > // Class 1 >Emitted(4, 5) Source(9, 5) + SourceIndex(0) 2 >Emitted(4, 13) Source(9, 13) + SourceIndex(0) --- >>> var Point = /** @class */ (function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^-> 1-> > 1->Emitted(5, 5) Source(10, 5) + SourceIndex(0) --- >>> // Constructor 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^ 3 > ^^^^^^^^^-> 1->export class Point implements IPoint { > 2 > // Constructor 1->Emitted(6, 9) Source(11, 9) + SourceIndex(0) 2 >Emitted(6, 23) Source(11, 23) + SourceIndex(0) --- >>> function Point(x, y) { 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^ 3 > ^ 4 > ^^ 5 > ^ 1-> > 2 > constructor(public 3 > x: number 4 > , public 5 > y: number 1->Emitted(7, 9) Source(12, 9) + SourceIndex(0) 2 >Emitted(7, 24) Source(12, 28) + SourceIndex(0) 3 >Emitted(7, 25) Source(12, 37) + SourceIndex(0) 4 >Emitted(7, 27) Source(12, 46) + SourceIndex(0) 5 >Emitted(7, 28) Source(12, 55) + SourceIndex(0) --- >>> this.x = x; 1 >^^^^^^^^^^^^ 2 > ^^^^^^ 3 > ^^^ 4 > ^ 5 > ^ 6 > ^-> 1 > 2 > x 3 > 4 > x 5 > : number 1 >Emitted(8, 13) Source(12, 28) + SourceIndex(0) 2 >Emitted(8, 19) Source(12, 29) + SourceIndex(0) 3 >Emitted(8, 22) Source(12, 28) + SourceIndex(0) 4 >Emitted(8, 23) Source(12, 29) + SourceIndex(0) 5 >Emitted(8, 24) Source(12, 37) + SourceIndex(0) --- >>> this.y = y; 1->^^^^^^^^^^^^ 2 > ^^^^^^ 3 > ^^^ 4 > ^ 5 > ^ 1->, public 2 > y 3 > 4 > y 5 > : number 1->Emitted(9, 13) Source(12, 46) + SourceIndex(0) 2 >Emitted(9, 19) Source(12, 47) + SourceIndex(0) 3 >Emitted(9, 22) Source(12, 46) + SourceIndex(0) 4 >Emitted(9, 23) Source(12, 47) + SourceIndex(0) 5 >Emitted(9, 24) Source(12, 55) + SourceIndex(0) --- >>> } 1 >^^^^^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^^-> 1 >) { 2 > } 1 >Emitted(10, 9) Source(12, 59) + SourceIndex(0) 2 >Emitted(10, 10) Source(12, 60) + SourceIndex(0) --- >>> // Instance member 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > 2 > // Instance member 1->Emitted(11, 9) Source(14, 9) + SourceIndex(0) 2 >Emitted(11, 27) Source(14, 27) + SourceIndex(0) --- >>> Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ 4 > ^^^^^^^^^^^^^^ 5 > ^^^^^^^ 6 > ^^^^ 7 > ^ 8 > ^^^^ 9 > ^ 10> ^^^^ 11> ^ 12> ^ 13> ^^^ 14> ^^^^ 15> ^ 16> ^ 17> ^^^ 18> ^^^^ 19> ^ 20> ^ 21> ^^^ 22> ^^^^ 23> ^ 24> ^ 25> ^ 26> ^ 27> ^ 28> ^ 1-> > 2 > getDist 3 > 4 > getDist() { 5 > return 6 > Math 7 > . 8 > sqrt 9 > ( 10> this 11> . 12> x 13> * 14> this 15> . 16> x 17> + 18> this 19> . 20> y 21> * 22> this 23> . 24> y 25> ) 26> ; 27> 28> } 1->Emitted(12, 9) Source(15, 9) + SourceIndex(0) 2 >Emitted(12, 32) Source(15, 16) + SourceIndex(0) 3 >Emitted(12, 35) Source(15, 9) + SourceIndex(0) 4 >Emitted(12, 49) Source(15, 21) + SourceIndex(0) 5 >Emitted(12, 56) Source(15, 28) + SourceIndex(0) 6 >Emitted(12, 60) Source(15, 32) + SourceIndex(0) 7 >Emitted(12, 61) Source(15, 33) + SourceIndex(0) 8 >Emitted(12, 65) Source(15, 37) + SourceIndex(0) 9 >Emitted(12, 66) Source(15, 38) + SourceIndex(0) 10>Emitted(12, 70) Source(15, 42) + SourceIndex(0) 11>Emitted(12, 71) Source(15, 43) + SourceIndex(0) 12>Emitted(12, 72) Source(15, 44) + SourceIndex(0) 13>Emitted(12, 75) Source(15, 47) + SourceIndex(0) 14>Emitted(12, 79) Source(15, 51) + SourceIndex(0) 15>Emitted(12, 80) Source(15, 52) + SourceIndex(0) 16>Emitted(12, 81) Source(15, 53) + SourceIndex(0) 17>Emitted(12, 84) Source(15, 56) + SourceIndex(0) 18>Emitted(12, 88) Source(15, 60) + SourceIndex(0) 19>Emitted(12, 89) Source(15, 61) + SourceIndex(0) 20>Emitted(12, 90) Source(15, 62) + SourceIndex(0) 21>Emitted(12, 93) Source(15, 65) + SourceIndex(0) 22>Emitted(12, 97) Source(15, 69) + SourceIndex(0) 23>Emitted(12, 98) Source(15, 70) + SourceIndex(0) 24>Emitted(12, 99) Source(15, 71) + SourceIndex(0) 25>Emitted(12, 100) Source(15, 72) + SourceIndex(0) 26>Emitted(12, 101) Source(15, 73) + SourceIndex(0) 27>Emitted(12, 102) Source(15, 74) + SourceIndex(0) 28>Emitted(12, 103) Source(15, 75) + SourceIndex(0) --- >>> // Static member 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^-> 1 > > > 2 > // Static member 1 >Emitted(13, 9) Source(17, 9) + SourceIndex(0) 2 >Emitted(13, 25) Source(17, 25) + SourceIndex(0) --- >>> Point.origin = new Point(0, 0); 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^ 4 > ^^^^ 5 > ^^^^^ 6 > ^ 7 > ^ 8 > ^^ 9 > ^ 10> ^ 11> ^ 1-> > static 2 > origin 3 > = 4 > new 5 > Point 6 > ( 7 > 0 8 > , 9 > 0 10> ) 11> ; 1->Emitted(14, 9) Source(18, 16) + SourceIndex(0) 2 >Emitted(14, 21) Source(18, 22) + SourceIndex(0) 3 >Emitted(14, 24) Source(18, 25) + SourceIndex(0) 4 >Emitted(14, 28) Source(18, 29) + SourceIndex(0) 5 >Emitted(14, 33) Source(18, 34) + SourceIndex(0) 6 >Emitted(14, 34) Source(18, 35) + SourceIndex(0) 7 >Emitted(14, 35) Source(18, 36) + SourceIndex(0) 8 >Emitted(14, 37) Source(18, 38) + SourceIndex(0) 9 >Emitted(14, 38) Source(18, 39) + SourceIndex(0) 10>Emitted(14, 39) Source(18, 40) + SourceIndex(0) 11>Emitted(14, 40) Source(18, 41) + SourceIndex(0) --- >>> return Point; 1 >^^^^^^^^ 2 > ^^^^^^^^^^^^ 1 > > 2 > } 1 >Emitted(15, 9) Source(19, 5) + SourceIndex(0) 2 >Emitted(15, 21) Source(19, 6) + SourceIndex(0) --- >>> }()); 1 >^^^^^ 2 > 3 > ^^^^ 4 > ^^^^^^^^^^^^^^^^^-> 1 > 2 > 3 > export class Point implements IPoint { > // Constructor > constructor(public x: number, public y: number) { } > > // Instance member > getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } > > // Static member > static origin = new Point(0, 0); > } 1 >Emitted(16, 6) Source(19, 6) + SourceIndex(0) 2 >Emitted(16, 6) Source(10, 5) + SourceIndex(0) 3 >Emitted(16, 10) Source(19, 6) + SourceIndex(0) --- >>> Shapes.Point = Point; 1->^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^ 4 > ^ 5 > ^^^^^^^^^^^-> 1-> 2 > Point 3 > implements IPoint { > // Constructor > constructor(public x: number, public y: number) { } > > // Instance member > getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } > > // Static member > static origin = new Point(0, 0); > } 4 > 1->Emitted(17, 5) Source(10, 18) + SourceIndex(0) 2 >Emitted(17, 17) Source(10, 23) + SourceIndex(0) 3 >Emitted(17, 25) Source(19, 6) + SourceIndex(0) 4 >Emitted(17, 26) Source(19, 6) + SourceIndex(0) --- >>> // Variable comment after class 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-> > > 2 > // Variable comment after class 1->Emitted(18, 5) Source(21, 5) + SourceIndex(0) 2 >Emitted(18, 36) Source(21, 36) + SourceIndex(0) --- >>> var a = 10; 1 >^^^^ 2 > ^^^^ 3 > ^ 4 > ^^^ 5 > ^^ 6 > ^ 7 > ^^^^^^-> 1 > > 2 > var 3 > a 4 > = 5 > 10 6 > ; 1 >Emitted(19, 5) Source(22, 5) + SourceIndex(0) 2 >Emitted(19, 9) Source(22, 9) + SourceIndex(0) 3 >Emitted(19, 10) Source(22, 10) + SourceIndex(0) 4 >Emitted(19, 13) Source(22, 13) + SourceIndex(0) 5 >Emitted(19, 15) Source(22, 15) + SourceIndex(0) 6 >Emitted(19, 16) Source(22, 16) + SourceIndex(0) --- >>> function foo() { 1->^^^^ 2 > ^^^^^^^^^ 3 > ^^^ 1-> > > 2 > export function 3 > foo 1->Emitted(20, 5) Source(24, 5) + SourceIndex(0) 2 >Emitted(20, 14) Source(24, 21) + SourceIndex(0) 3 >Emitted(20, 17) Source(24, 24) + SourceIndex(0) --- >>> } 1 >^^^^ 2 > ^ 3 > ^^^^^^^^^^^^^^^^^-> 1 >() { > 2 > } 1 >Emitted(21, 5) Source(25, 5) + SourceIndex(0) 2 >Emitted(21, 6) Source(25, 6) + SourceIndex(0) --- >>> Shapes.foo = foo; 1->^^^^ 2 > ^^^^^^^^^^ 3 > ^^^^^^ 4 > ^ 5 > ^^^^^^^^^^^-> 1-> 2 > foo 3 > () { > } 4 > 1->Emitted(22, 5) Source(24, 21) + SourceIndex(0) 2 >Emitted(22, 15) Source(24, 24) + SourceIndex(0) 3 >Emitted(22, 21) Source(25, 6) + SourceIndex(0) 4 >Emitted(22, 22) Source(25, 6) + SourceIndex(0) --- >>> /** comment after function 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > 1->Emitted(23, 5) Source(27, 5) + SourceIndex(0) --- >>> * this is another comment >>> */ 1->^^^^^^ 2 > ^^^^^^^^^^-> 1->/** comment after function > * this is another comment > */ 1->Emitted(25, 7) Source(29, 7) + SourceIndex(0) --- >>> var b = 10; 1->^^^^ 2 > ^^^^ 3 > ^ 4 > ^^^ 5 > ^^ 6 > ^ 7 > ^^^^^^^^^^^^^^-> 1-> > 2 > var 3 > b 4 > = 5 > 10 6 > ; 1->Emitted(26, 5) Source(30, 5) + SourceIndex(0) 2 >Emitted(26, 9) Source(30, 9) + SourceIndex(0) 3 >Emitted(26, 10) Source(30, 10) + SourceIndex(0) 4 >Emitted(26, 13) Source(30, 13) + SourceIndex(0) 5 >Emitted(26, 15) Source(30, 15) + SourceIndex(0) 6 >Emitted(26, 16) Source(30, 16) + SourceIndex(0) --- >>>})(Shapes || (Shapes = {})); 1-> 2 >^ 3 > ^^ 4 > ^^^^^^ 5 > ^^^^^ 6 > ^^^^^^ 7 > ^^^^^^^^ 1-> > 2 >} 3 > 4 > Shapes 5 > 6 > Shapes 7 > { > > // Class > export class Point implements IPoint { > // Constructor > constructor(public x: number, public y: number) { } > > // Instance member > getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } > > // Static member > static origin = new Point(0, 0); > } > > // Variable comment after class > var a = 10; > > export function foo() { > } > > /** comment after function > * this is another comment > */ > var b = 10; > } 1->Emitted(27, 1) Source(31, 1) + SourceIndex(0) 2 >Emitted(27, 2) Source(31, 2) + SourceIndex(0) 3 >Emitted(27, 4) Source(7, 8) + SourceIndex(0) 4 >Emitted(27, 10) Source(7, 14) + SourceIndex(0) 5 >Emitted(27, 15) Source(7, 8) + SourceIndex(0) 6 >Emitted(27, 21) Source(7, 14) + SourceIndex(0) 7 >Emitted(27, 29) Source(31, 2) + SourceIndex(0) --- >>>/** Local Variable */ 1 > 2 >^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^-> 1 > > > 2 >/** Local Variable */ 1 >Emitted(28, 1) Source(33, 1) + SourceIndex(0) 2 >Emitted(28, 22) Source(33, 22) + SourceIndex(0) --- >>>var p = new Shapes.Point(3, 4); 1-> 2 >^^^^ 3 > ^ 4 > ^^^ 5 > ^^^^ 6 > ^^^^^^ 7 > ^ 8 > ^^^^^ 9 > ^ 10> ^ 11> ^^ 12> ^ 13> ^ 14> ^ 1-> > 2 >var 3 > p 4 > : IPoint = 5 > new 6 > Shapes 7 > . 8 > Point 9 > ( 10> 3 11> , 12> 4 13> ) 14> ; 1->Emitted(29, 1) Source(34, 1) + SourceIndex(0) 2 >Emitted(29, 5) Source(34, 5) + SourceIndex(0) 3 >Emitted(29, 6) Source(34, 6) + SourceIndex(0) 4 >Emitted(29, 9) Source(34, 17) + SourceIndex(0) 5 >Emitted(29, 13) Source(34, 21) + SourceIndex(0) 6 >Emitted(29, 19) Source(34, 27) + SourceIndex(0) 7 >Emitted(29, 20) Source(34, 28) + SourceIndex(0) 8 >Emitted(29, 25) Source(34, 33) + SourceIndex(0) 9 >Emitted(29, 26) Source(34, 34) + SourceIndex(0) 10>Emitted(29, 27) Source(34, 35) + SourceIndex(0) 11>Emitted(29, 29) Source(34, 37) + SourceIndex(0) 12>Emitted(29, 30) Source(34, 38) + SourceIndex(0) 13>Emitted(29, 31) Source(34, 39) + SourceIndex(0) 14>Emitted(29, 32) Source(34, 40) + SourceIndex(0) --- >>>var dist = p.getDist(); 1 > 2 >^^^^ 3 > ^^^^ 4 > ^^^ 5 > ^ 6 > ^ 7 > ^^^^^^^ 8 > ^^ 9 > ^ 10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 >var 3 > dist 4 > = 5 > p 6 > . 7 > getDist 8 > () 9 > ; 1 >Emitted(30, 1) Source(35, 1) + SourceIndex(0) 2 >Emitted(30, 5) Source(35, 5) + SourceIndex(0) 3 >Emitted(30, 9) Source(35, 9) + SourceIndex(0) 4 >Emitted(30, 12) Source(35, 12) + SourceIndex(0) 5 >Emitted(30, 13) Source(35, 13) + SourceIndex(0) 6 >Emitted(30, 14) Source(35, 14) + SourceIndex(0) 7 >Emitted(30, 21) Source(35, 21) + SourceIndex(0) 8 >Emitted(30, 23) Source(35, 23) + SourceIndex(0) 9 >Emitted(30, 24) Source(35, 24) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMap-FileWithComments.js.map