2014-07-13 01:04:16 +02:00
|
|
|
//// [sourceMap-FileWithComments.ts]
|
|
|
|
|
|
|
|
// Interface
|
|
|
|
interface IPoint {
|
|
|
|
getDist(): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Module
|
|
|
|
module Shapes {
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Local Variable */
|
|
|
|
var p: IPoint = new Shapes.Point(3, 4);
|
|
|
|
var dist = p.getDist();
|
|
|
|
|
|
|
|
//// [sourceMap-FileWithComments.js]
|
2014-08-14 15:53:37 +02:00
|
|
|
// Module
|
2014-07-13 01:04:16 +02:00
|
|
|
var Shapes;
|
|
|
|
(function (Shapes) {
|
2014-08-14 15:42:18 +02:00
|
|
|
// Class
|
2014-07-13 01:04:16 +02:00
|
|
|
var Point = (function () {
|
2014-08-14 15:42:18 +02:00
|
|
|
// Constructor
|
2014-07-13 01:04:16 +02:00
|
|
|
function Point(x, y) {
|
|
|
|
this.x = x;
|
|
|
|
this.y = y;
|
|
|
|
}
|
2014-08-14 15:21:30 +02:00
|
|
|
// Instance member
|
2014-07-13 01:04:16 +02:00
|
|
|
Point.prototype.getDist = function () {
|
|
|
|
return Math.sqrt(this.x * this.x + this.y * this.y);
|
|
|
|
};
|
2014-08-14 15:31:00 +02:00
|
|
|
// Static member
|
2014-07-13 01:04:16 +02:00
|
|
|
Point.origin = new Point(0, 0);
|
|
|
|
return Point;
|
|
|
|
})();
|
|
|
|
Shapes.Point = Point;
|
2014-08-12 00:54:12 +02:00
|
|
|
// Variable comment after class
|
2014-07-13 01:04:16 +02:00
|
|
|
var a = 10;
|
|
|
|
function foo() {
|
|
|
|
}
|
|
|
|
Shapes.foo = foo;
|
2014-08-14 23:43:28 +02:00
|
|
|
/** comment after function
|
|
|
|
* this is another comment
|
2014-08-12 00:54:12 +02:00
|
|
|
*/
|
2014-07-13 01:04:16 +02:00
|
|
|
var b = 10;
|
|
|
|
})(Shapes || (Shapes = {}));
|
2014-08-12 00:54:12 +02:00
|
|
|
/** Local Variable */
|
2014-07-13 01:04:16 +02:00
|
|
|
var p = new Shapes.Point(3, 4);
|
|
|
|
var dist = p.getDist();
|
|
|
|
//# sourceMappingURL=sourceMap-FileWithComments.js.map
|