TypeScript/tests/baselines/reference/sourceMap-FileWithComments.symbols
2015-04-15 16:44:20 -07:00

78 lines
3.2 KiB
Text

=== tests/cases/compiler/sourceMap-FileWithComments.ts ===
// Interface
interface IPoint {
>IPoint : Symbol(IPoint, Decl(sourceMap-FileWithComments.ts, 0, 0))
getDist(): number;
>getDist : Symbol(getDist, Decl(sourceMap-FileWithComments.ts, 2, 18))
}
// Module
module Shapes {
>Shapes : Symbol(Shapes, Decl(sourceMap-FileWithComments.ts, 4, 1))
// Class
export class Point implements IPoint {
>Point : Symbol(Point, Decl(sourceMap-FileWithComments.ts, 7, 15))
>IPoint : Symbol(IPoint, Decl(sourceMap-FileWithComments.ts, 0, 0))
// Constructor
constructor(public x: number, public y: number) { }
>x : Symbol(x, Decl(sourceMap-FileWithComments.ts, 12, 20))
>y : Symbol(y, Decl(sourceMap-FileWithComments.ts, 12, 37))
// Instance member
getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); }
>getDist : Symbol(getDist, Decl(sourceMap-FileWithComments.ts, 12, 59))
>Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, 620, 27))
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11))
>sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, 620, 27))
>this.x : Symbol(x, Decl(sourceMap-FileWithComments.ts, 12, 20))
>this : Symbol(Point, Decl(sourceMap-FileWithComments.ts, 7, 15))
>x : Symbol(x, Decl(sourceMap-FileWithComments.ts, 12, 20))
>this.x : Symbol(x, Decl(sourceMap-FileWithComments.ts, 12, 20))
>this : Symbol(Point, Decl(sourceMap-FileWithComments.ts, 7, 15))
>x : Symbol(x, Decl(sourceMap-FileWithComments.ts, 12, 20))
>this.y : Symbol(y, Decl(sourceMap-FileWithComments.ts, 12, 37))
>this : Symbol(Point, Decl(sourceMap-FileWithComments.ts, 7, 15))
>y : Symbol(y, Decl(sourceMap-FileWithComments.ts, 12, 37))
>this.y : Symbol(y, Decl(sourceMap-FileWithComments.ts, 12, 37))
>this : Symbol(Point, Decl(sourceMap-FileWithComments.ts, 7, 15))
>y : Symbol(y, Decl(sourceMap-FileWithComments.ts, 12, 37))
// Static member
static origin = new Point(0, 0);
>origin : Symbol(Point.origin, Decl(sourceMap-FileWithComments.ts, 15, 74))
>Point : Symbol(Point, Decl(sourceMap-FileWithComments.ts, 7, 15))
}
// Variable comment after class
var a = 10;
>a : Symbol(a, Decl(sourceMap-FileWithComments.ts, 22, 7))
export function foo() {
>foo : Symbol(foo, Decl(sourceMap-FileWithComments.ts, 22, 15))
}
/** comment after function
* this is another comment
*/
var b = 10;
>b : Symbol(b, Decl(sourceMap-FileWithComments.ts, 30, 7))
}
/** Local Variable */
var p: IPoint = new Shapes.Point(3, 4);
>p : Symbol(p, Decl(sourceMap-FileWithComments.ts, 34, 3))
>IPoint : Symbol(IPoint, Decl(sourceMap-FileWithComments.ts, 0, 0))
>Shapes.Point : Symbol(Shapes.Point, Decl(sourceMap-FileWithComments.ts, 7, 15))
>Shapes : Symbol(Shapes, Decl(sourceMap-FileWithComments.ts, 4, 1))
>Point : Symbol(Shapes.Point, Decl(sourceMap-FileWithComments.ts, 7, 15))
var dist = p.getDist();
>dist : Symbol(dist, Decl(sourceMap-FileWithComments.ts, 35, 3))
>p.getDist : Symbol(IPoint.getDist, Decl(sourceMap-FileWithComments.ts, 2, 18))
>p : Symbol(p, Decl(sourceMap-FileWithComments.ts, 34, 3))
>getDist : Symbol(IPoint.getDist, Decl(sourceMap-FileWithComments.ts, 2, 18))