File: jsdocImplements_class.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (112 lines) | stat: -rw-r--r-- 2,040 bytes parent folder | download | duplicates (4)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
=== /a.js ===
class A {
>A : A

    /** @return {number} */
    method() { throw new Error(); }
>method : () => number
>new Error() : Error
>Error : ErrorConstructor
}
/** @implements {A} */
class B  {
>B : B

    method() { return 0 }
>method : () => number
>0 : 0
}

/** @implements A */
class B2  {
>B2 : B2

    /** @return {string} */
    method() { return "" }
>method : () => string
>"" : ""
}

/** @implements {A} */
class B3  {
>B3 : B3
}


var Ns = {};
>Ns : typeof Ns
>{} : {}

/** @implements {A} */
Ns.C1 = class {
>Ns.C1 = class {    method() { return 11; }} : typeof C1
>Ns.C1 : typeof C1
>Ns : typeof Ns
>C1 : typeof C1
>class {    method() { return 11; }} : typeof C1

    method() { return 11; }
>method : () => number
>11 : 11
}
/** @implements {A} */
var C2 = class {
>C2 : typeof C2
>class {    method() { return 12; }} : typeof C2

    method() { return 12; }
>method : () => number
>12 : 12
}
var o = {
>o : { C3: typeof C3; }
>{    /** @implements {A} */    C3: class {        method() { return 13; }    }} : { C3: typeof C3; }

    /** @implements {A} */
    C3: class {
>C3 : typeof C3
>class {        method() { return 13; }    } : typeof C3

        method() { return 13; }
>method : () => number
>13 : 13
    }
}
class CC {
>CC : CC

    /** @implements {A} */
    C4 = class {
>C4 : typeof (Anonymous class)
>class {        method() {            return 14;        }    } : typeof (Anonymous class)

        method() {
>method : () => number

            return 14;
>14 : 14
        }
    }
}

var C5;
>C5 : any

/** @implements {A} */
Ns.C5 = C5 || class {
>Ns.C5 = C5 || class {    method() {        return 15;    }} : typeof C5
>Ns.C5 : typeof C5
>Ns : typeof Ns
>C5 : typeof C5
>C5 || class {    method() {        return 15;    }} : typeof C5
>C5 : undefined
>class {    method() {        return 15;    }} : typeof C5

    method() {
>method : () => number

        return 15;
>15 : 15
    }
}