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