File: instanceAndStaticDeclarations1.types

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (67 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download | duplicates (2)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
=== tests/cases/compiler/instanceAndStaticDeclarations1.ts ===
// from spec

class Point {
>Point : Point

    constructor(public x: number, public y: number) { }
>x : number
>y : number

    public distance(p: Point) {
>distance : (p: Point) => number
>p : Point
>Point : Point

        var dx = this.x - p.x;
>dx : number
>this.x - p.x : number
>this.x : number
>this : this
>x : number
>p.x : number
>p : Point
>x : number

        var dy = this.y - p.y;
>dy : number
>this.y - p.y : number
>this.y : number
>this : this
>y : number
>p.y : number
>p : Point
>y : number

        return Math.sqrt(dx * dx + dy * dy);
>Math.sqrt(dx * dx + dy * dy) : number
>Math.sqrt : (x: number) => number
>Math : Math
>sqrt : (x: number) => number
>dx * dx + dy * dy : number
>dx * dx : number
>dx : number
>dx : number
>dy * dy : number
>dy : number
>dy : number
    }
    static origin = new Point(0, 0);
>origin : Point
>new Point(0, 0) : Point
>Point : typeof Point
>0 : 0
>0 : 0

    static distance(p1: Point, p2: Point) { return p1.distance(p2); }
>distance : (p1: Point, p2: Point) => number
>p1 : Point
>Point : Point
>p2 : Point
>Point : Point
>p1.distance(p2) : number
>p1.distance : (p: Point) => number
>p1 : Point
>distance : (p: Point) => number
>p2 : Point
}