659 lines
No EOL
22 KiB
Text
659 lines
No EOL
22 KiB
Text
===================================================================
|
|
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 >^^^^^^^^^
|
|
4 > ^^^->
|
|
1 >
|
|
>// Interface
|
|
>interface IPoint {
|
|
> getDist(): number;
|
|
>}
|
|
>
|
|
>// Module
|
|
>
|
|
2 >
|
|
3 >// Module
|
|
1 >Emitted(1, 1) Source(8, 1) + SourceIndex(0)
|
|
2 >Emitted(1, 1) Source(7, 1) + SourceIndex(0)
|
|
3 >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 > ^^^^^^
|
|
4 > ^^
|
|
5 > ^
|
|
1->
|
|
2 >module
|
|
3 > Shapes
|
|
4 >
|
|
5 > {
|
|
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)
|
|
4 >Emitted(3, 20) Source(8, 15) + SourceIndex(0)
|
|
5 >Emitted(3, 21) Source(8, 16) + SourceIndex(0)
|
|
---
|
|
>>> // Class
|
|
1 >^^^^
|
|
2 >
|
|
3 > ^^^^^^^^
|
|
4 > ^^^^^^^^^^^^^^^^^^^->
|
|
1 >
|
|
>
|
|
> // Class
|
|
>
|
|
2 >
|
|
3 > // Class
|
|
1 >Emitted(4, 5) Source(11, 5) + SourceIndex(0) name (Shapes)
|
|
2 >Emitted(4, 5) Source(10, 5) + SourceIndex(0) name (Shapes)
|
|
3 >Emitted(4, 13) Source(10, 13) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>> var Point = (function () {
|
|
1->^^^^^^^^
|
|
2 > ^^^^^
|
|
3 > ^^^^^^^^^^->
|
|
1->
|
|
> export class
|
|
2 > Point
|
|
1->Emitted(5, 9) Source(11, 18) + SourceIndex(0) name (Shapes)
|
|
2 >Emitted(5, 14) Source(11, 23) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>> // Constructor
|
|
1->^^^^^^^^
|
|
2 > ^^^^^^^^^^^^^^
|
|
3 > ^^^^^^^^^->
|
|
1-> implements IPoint {
|
|
>
|
|
2 > // Constructor
|
|
1->Emitted(6, 9) Source(12, 9) + SourceIndex(0) name (Shapes.Point)
|
|
2 >Emitted(6, 23) Source(12, 23) + SourceIndex(0) name (Shapes.Point)
|
|
---
|
|
>>> function Point(x, y) {
|
|
1->^^^^^^^^
|
|
2 > ^^^^^^^^^
|
|
3 > ^^^^^
|
|
4 > ^
|
|
5 > ^
|
|
6 > ^^
|
|
7 > ^
|
|
1->
|
|
>
|
|
2 >
|
|
3 > Point
|
|
4 > implements IPoint {
|
|
> // Constructor
|
|
> constructor(public
|
|
5 > x: number
|
|
6 > , public
|
|
7 > y: number
|
|
1->Emitted(7, 9) Source(13, 9) + SourceIndex(0) name (Shapes.Point)
|
|
2 >Emitted(7, 18) Source(11, 18) + SourceIndex(0) name (Shapes.Point)
|
|
3 >Emitted(7, 23) Source(11, 23) + SourceIndex(0) name (Shapes.Point)
|
|
4 >Emitted(7, 24) Source(13, 28) + SourceIndex(0) name (Shapes.Point)
|
|
5 >Emitted(7, 25) Source(13, 37) + SourceIndex(0) name (Shapes.Point)
|
|
6 >Emitted(7, 27) Source(13, 46) + SourceIndex(0) name (Shapes.Point)
|
|
7 >Emitted(7, 28) Source(13, 55) + SourceIndex(0) name (Shapes.Point)
|
|
---
|
|
>>> 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) name (Shapes.Point.constructor)
|
|
2 >Emitted(8, 19) Source(13, 29) + SourceIndex(0) name (Shapes.Point.constructor)
|
|
3 >Emitted(8, 22) Source(13, 28) + SourceIndex(0) name (Shapes.Point.constructor)
|
|
4 >Emitted(8, 23) Source(13, 29) + SourceIndex(0) name (Shapes.Point.constructor)
|
|
5 >Emitted(8, 24) Source(13, 37) + SourceIndex(0) name (Shapes.Point.constructor)
|
|
---
|
|
>>> 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) name (Shapes.Point.constructor)
|
|
2 >Emitted(9, 19) Source(13, 47) + SourceIndex(0) name (Shapes.Point.constructor)
|
|
3 >Emitted(9, 22) Source(13, 46) + SourceIndex(0) name (Shapes.Point.constructor)
|
|
4 >Emitted(9, 23) Source(13, 47) + SourceIndex(0) name (Shapes.Point.constructor)
|
|
5 >Emitted(9, 24) Source(13, 55) + SourceIndex(0) name (Shapes.Point.constructor)
|
|
---
|
|
>>> }
|
|
1 >^^^^^^^^
|
|
2 > ^
|
|
3 > ^^^^^^^^^^^^^^^^^^->
|
|
1 >) {
|
|
2 > }
|
|
1 >Emitted(10, 9) Source(13, 59) + SourceIndex(0) name (Shapes.Point.constructor)
|
|
2 >Emitted(10, 10) Source(13, 60) + SourceIndex(0) name (Shapes.Point.constructor)
|
|
---
|
|
>>> // Instance member
|
|
1->^^^^^^^^
|
|
2 > ^^^^^^^^^^^^^^^^^^
|
|
3 > ^^^^^^^^^^^^^^^^^^^^^^->
|
|
1->
|
|
>
|
|
>
|
|
2 > // Instance member
|
|
1->Emitted(11, 9) Source(15, 9) + SourceIndex(0) name (Shapes.Point)
|
|
2 >Emitted(11, 27) Source(15, 27) + SourceIndex(0) name (Shapes.Point)
|
|
---
|
|
>>> Point.prototype.getDist = function () {
|
|
1->^^^^^^^^
|
|
2 > ^^^^^^^^^^^^^^^^^^^^^^^
|
|
3 > ^^^
|
|
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
|
1->
|
|
>
|
|
2 > getDist
|
|
3 >
|
|
1->Emitted(12, 9) Source(16, 9) + SourceIndex(0) name (Shapes.Point)
|
|
2 >Emitted(12, 32) Source(16, 16) + SourceIndex(0) name (Shapes.Point)
|
|
3 >Emitted(12, 35) Source(16, 9) + SourceIndex(0) name (Shapes.Point)
|
|
---
|
|
>>> 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> ^
|
|
1->getDist() {
|
|
2 > return
|
|
3 >
|
|
4 > Math
|
|
5 > .
|
|
6 > sqrt
|
|
7 > (
|
|
8 > this
|
|
9 > .
|
|
10> x
|
|
11> *
|
|
12> this
|
|
13> .
|
|
14> x
|
|
15> +
|
|
16> this
|
|
17> .
|
|
18> y
|
|
19> *
|
|
20> this
|
|
21> .
|
|
22> y
|
|
23> )
|
|
24> ;
|
|
1->Emitted(13, 13) Source(16, 21) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
2 >Emitted(13, 19) Source(16, 27) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
3 >Emitted(13, 20) Source(16, 28) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
4 >Emitted(13, 24) Source(16, 32) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
5 >Emitted(13, 25) Source(16, 33) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
6 >Emitted(13, 29) Source(16, 37) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
7 >Emitted(13, 30) Source(16, 38) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
8 >Emitted(13, 34) Source(16, 42) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
9 >Emitted(13, 35) Source(16, 43) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
10>Emitted(13, 36) Source(16, 44) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
11>Emitted(13, 39) Source(16, 47) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
12>Emitted(13, 43) Source(16, 51) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
13>Emitted(13, 44) Source(16, 52) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
14>Emitted(13, 45) Source(16, 53) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
15>Emitted(13, 48) Source(16, 56) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
16>Emitted(13, 52) Source(16, 60) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
17>Emitted(13, 53) Source(16, 61) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
18>Emitted(13, 54) Source(16, 62) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
19>Emitted(13, 57) Source(16, 65) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
20>Emitted(13, 61) Source(16, 69) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
21>Emitted(13, 62) Source(16, 70) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
22>Emitted(13, 63) Source(16, 71) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
23>Emitted(13, 64) Source(16, 72) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
24>Emitted(13, 65) Source(16, 73) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
---
|
|
>>> };
|
|
1 >^^^^^^^^
|
|
2 > ^
|
|
3 > ^^^^^^^^^^^^^^^^->
|
|
1 >
|
|
2 > }
|
|
1 >Emitted(14, 9) Source(16, 74) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
2 >Emitted(14, 10) Source(16, 75) + SourceIndex(0) name (Shapes.Point.getDist)
|
|
---
|
|
>>> // Static member
|
|
1->^^^^^^^^
|
|
2 > ^^^^^^^^^^^^^^^^
|
|
3 > ^^^^^^^^^^^^^^^^->
|
|
1->
|
|
>
|
|
>
|
|
2 > // Static member
|
|
1->Emitted(15, 9) Source(18, 9) + SourceIndex(0) name (Shapes.Point)
|
|
2 >Emitted(15, 25) Source(18, 25) + SourceIndex(0) name (Shapes.Point)
|
|
---
|
|
>>> 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, 9) Source(19, 16) + SourceIndex(0) name (Shapes.Point)
|
|
2 >Emitted(16, 21) Source(19, 22) + SourceIndex(0) name (Shapes.Point)
|
|
3 >Emitted(16, 24) Source(19, 25) + SourceIndex(0) name (Shapes.Point)
|
|
4 >Emitted(16, 28) Source(19, 29) + SourceIndex(0) name (Shapes.Point)
|
|
5 >Emitted(16, 33) Source(19, 34) + SourceIndex(0) name (Shapes.Point)
|
|
6 >Emitted(16, 34) Source(19, 35) + SourceIndex(0) name (Shapes.Point)
|
|
7 >Emitted(16, 35) Source(19, 36) + SourceIndex(0) name (Shapes.Point)
|
|
8 >Emitted(16, 37) Source(19, 38) + SourceIndex(0) name (Shapes.Point)
|
|
9 >Emitted(16, 38) Source(19, 39) + SourceIndex(0) name (Shapes.Point)
|
|
10>Emitted(16, 39) Source(19, 40) + SourceIndex(0) name (Shapes.Point)
|
|
11>Emitted(16, 40) Source(19, 41) + SourceIndex(0) name (Shapes.Point)
|
|
---
|
|
>>> return Point;
|
|
1 >^^^^^^^^
|
|
2 > ^^^^^^^^^^^^
|
|
1 >
|
|
>
|
|
2 > }
|
|
1 >Emitted(17, 9) Source(20, 5) + SourceIndex(0) name (Shapes.Point)
|
|
2 >Emitted(17, 21) Source(20, 6) + SourceIndex(0) name (Shapes.Point)
|
|
---
|
|
>>> })();
|
|
1 >^^^^
|
|
2 > ^
|
|
3 >
|
|
4 > ^^^^
|
|
5 > ^^^^^^^^^^^^^^^^^->
|
|
1 >
|
|
2 > }
|
|
3 >
|
|
4 > 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(18, 5) Source(20, 5) + SourceIndex(0) name (Shapes.Point)
|
|
2 >Emitted(18, 6) Source(20, 6) + SourceIndex(0) name (Shapes.Point)
|
|
3 >Emitted(18, 6) Source(11, 5) + SourceIndex(0) name (Shapes)
|
|
4 >Emitted(18, 10) Source(20, 6) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>> Shapes.Point = Point;
|
|
1->^^^^
|
|
2 > ^^^^^^^^^^^^
|
|
3 > ^^^
|
|
4 > ^^^^^
|
|
5 > ^
|
|
6 > ^^^^^^^^^^^->
|
|
1->
|
|
2 > Point
|
|
3 >
|
|
4 > 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);
|
|
> }
|
|
5 >
|
|
1->Emitted(19, 5) Source(11, 18) + SourceIndex(0) name (Shapes)
|
|
2 >Emitted(19, 17) Source(11, 23) + SourceIndex(0) name (Shapes)
|
|
3 >Emitted(19, 20) Source(11, 18) + SourceIndex(0) name (Shapes)
|
|
4 >Emitted(19, 25) Source(20, 6) + SourceIndex(0) name (Shapes)
|
|
5 >Emitted(19, 26) Source(20, 6) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>> // Variable comment after class
|
|
1->^^^^
|
|
2 >
|
|
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
1->
|
|
>
|
|
> // Variable comment after class
|
|
>
|
|
2 >
|
|
3 > // Variable comment after class
|
|
1->Emitted(20, 5) Source(23, 5) + SourceIndex(0) name (Shapes)
|
|
2 >Emitted(20, 5) Source(22, 5) + SourceIndex(0) name (Shapes)
|
|
3 >Emitted(20, 36) Source(22, 36) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>> var a = 10;
|
|
1 >^^^^^^^^
|
|
2 > ^
|
|
3 > ^^^
|
|
4 > ^^
|
|
5 > ^
|
|
6 > ^^^^^^->
|
|
1 >
|
|
> var
|
|
2 > a
|
|
3 > =
|
|
4 > 10
|
|
5 > ;
|
|
1 >Emitted(21, 9) Source(23, 9) + SourceIndex(0) name (Shapes)
|
|
2 >Emitted(21, 10) Source(23, 10) + SourceIndex(0) name (Shapes)
|
|
3 >Emitted(21, 13) Source(23, 13) + SourceIndex(0) name (Shapes)
|
|
4 >Emitted(21, 15) Source(23, 15) + SourceIndex(0) name (Shapes)
|
|
5 >Emitted(21, 16) Source(23, 16) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>> function foo() {
|
|
1->^^^^
|
|
2 > ^^^^^^^^^
|
|
3 > ^^^
|
|
1->
|
|
>
|
|
>
|
|
2 > export function
|
|
3 > foo
|
|
1->Emitted(22, 5) Source(25, 5) + SourceIndex(0) name (Shapes)
|
|
2 >Emitted(22, 14) Source(25, 21) + SourceIndex(0) name (Shapes)
|
|
3 >Emitted(22, 17) Source(25, 24) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>> }
|
|
1 >^^^^
|
|
2 > ^
|
|
3 > ^^^^^^^^^^^^^^^^^->
|
|
1 >() {
|
|
>
|
|
2 > }
|
|
1 >Emitted(23, 5) Source(26, 5) + SourceIndex(0) name (Shapes.foo)
|
|
2 >Emitted(23, 6) Source(26, 6) + SourceIndex(0) name (Shapes.foo)
|
|
---
|
|
>>> Shapes.foo = foo;
|
|
1->^^^^
|
|
2 > ^^^^^^^^^^
|
|
3 > ^^^
|
|
4 > ^^^
|
|
5 > ^
|
|
6 > ^^^^^^^^^^->
|
|
1->
|
|
2 > foo
|
|
3 >
|
|
4 > foo() {
|
|
> }
|
|
5 >
|
|
1->Emitted(24, 5) Source(25, 21) + SourceIndex(0) name (Shapes)
|
|
2 >Emitted(24, 15) Source(25, 24) + SourceIndex(0) name (Shapes)
|
|
3 >Emitted(24, 18) Source(25, 21) + SourceIndex(0) name (Shapes)
|
|
4 >Emitted(24, 21) Source(26, 6) + SourceIndex(0) name (Shapes)
|
|
5 >Emitted(24, 22) Source(26, 6) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>> /** comment after function
|
|
1->^^^^
|
|
2 >
|
|
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^->
|
|
1->
|
|
>
|
|
> /** comment after function
|
|
> * this is another comment
|
|
> */
|
|
>
|
|
2 >
|
|
1->Emitted(25, 5) Source(31, 5) + SourceIndex(0) name (Shapes)
|
|
2 >Emitted(25, 5) Source(28, 5) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>> * this is another comment
|
|
>>> */
|
|
1->^^^^^^
|
|
2 > ^^^^^^^^^^->
|
|
1->/** comment after function
|
|
> * this is another comment
|
|
> */
|
|
1->Emitted(27, 7) Source(30, 7) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>> var b = 10;
|
|
1->^^^^^^^^
|
|
2 > ^
|
|
3 > ^^^
|
|
4 > ^^
|
|
5 > ^
|
|
6 > ^^^^^^^^^^^^^^->
|
|
1->
|
|
> var
|
|
2 > b
|
|
3 > =
|
|
4 > 10
|
|
5 > ;
|
|
1->Emitted(28, 9) Source(31, 9) + SourceIndex(0) name (Shapes)
|
|
2 >Emitted(28, 10) Source(31, 10) + SourceIndex(0) name (Shapes)
|
|
3 >Emitted(28, 13) Source(31, 13) + SourceIndex(0) name (Shapes)
|
|
4 >Emitted(28, 15) Source(31, 15) + SourceIndex(0) name (Shapes)
|
|
5 >Emitted(28, 16) Source(31, 16) + SourceIndex(0) name (Shapes)
|
|
---
|
|
>>>})(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(29, 1) Source(32, 1) + SourceIndex(0) name (Shapes)
|
|
2 >Emitted(29, 2) Source(32, 2) + SourceIndex(0) name (Shapes)
|
|
3 >Emitted(29, 4) Source(8, 8) + SourceIndex(0)
|
|
4 >Emitted(29, 10) Source(8, 14) + SourceIndex(0)
|
|
5 >Emitted(29, 15) Source(8, 8) + SourceIndex(0)
|
|
6 >Emitted(29, 21) Source(8, 14) + SourceIndex(0)
|
|
7 >Emitted(29, 29) Source(32, 2) + SourceIndex(0)
|
|
---
|
|
>>>/** Local Variable */
|
|
1 >
|
|
2 >
|
|
3 >^^^^^^^^^^^^^^^^^^^^^
|
|
4 > ^^^^^^^^^^^->
|
|
1 >
|
|
>
|
|
>/** Local Variable */
|
|
>
|
|
2 >
|
|
3 >/** Local Variable */
|
|
1 >Emitted(30, 1) Source(35, 1) + SourceIndex(0)
|
|
2 >Emitted(30, 1) Source(34, 1) + SourceIndex(0)
|
|
3 >Emitted(30, 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> ^
|
|
1->
|
|
>var
|
|
2 > p
|
|
3 > : IPoint =
|
|
4 > new
|
|
5 > Shapes
|
|
6 > .
|
|
7 > Point
|
|
8 > (
|
|
9 > 3
|
|
10> ,
|
|
11> 4
|
|
12> )
|
|
13> ;
|
|
1->Emitted(31, 5) Source(35, 5) + SourceIndex(0)
|
|
2 >Emitted(31, 6) Source(35, 6) + SourceIndex(0)
|
|
3 >Emitted(31, 9) Source(35, 17) + SourceIndex(0)
|
|
4 >Emitted(31, 13) Source(35, 21) + SourceIndex(0)
|
|
5 >Emitted(31, 19) Source(35, 27) + SourceIndex(0)
|
|
6 >Emitted(31, 20) Source(35, 28) + SourceIndex(0)
|
|
7 >Emitted(31, 25) Source(35, 33) + SourceIndex(0)
|
|
8 >Emitted(31, 26) Source(35, 34) + SourceIndex(0)
|
|
9 >Emitted(31, 27) Source(35, 35) + SourceIndex(0)
|
|
10>Emitted(31, 29) Source(35, 37) + SourceIndex(0)
|
|
11>Emitted(31, 30) Source(35, 38) + SourceIndex(0)
|
|
12>Emitted(31, 31) Source(35, 39) + SourceIndex(0)
|
|
13>Emitted(31, 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(32, 1) Source(36, 1) + SourceIndex(0)
|
|
2 >Emitted(32, 5) Source(36, 5) + SourceIndex(0)
|
|
3 >Emitted(32, 9) Source(36, 9) + SourceIndex(0)
|
|
4 >Emitted(32, 12) Source(36, 12) + SourceIndex(0)
|
|
5 >Emitted(32, 13) Source(36, 13) + SourceIndex(0)
|
|
6 >Emitted(32, 14) Source(36, 14) + SourceIndex(0)
|
|
7 >Emitted(32, 21) Source(36, 21) + SourceIndex(0)
|
|
8 >Emitted(32, 23) Source(36, 23) + SourceIndex(0)
|
|
9 >Emitted(32, 24) Source(36, 24) + SourceIndex(0)
|
|
---
|
|
>>>//# sourceMappingURL=sourceMap-FileWithComments.js.map |