File: jsEnumCrossFileExport.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (109 lines) | stat: -rw-r--r-- 3,325 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
=== tests/cases/compiler/enumDef.js ===
var Host = {};
>Host : typeof Host
>{} : {}

Host.UserMetrics = {};
>Host.UserMetrics = {} : typeof Host.UserMetrics
>Host.UserMetrics : typeof Host.UserMetrics
>Host : typeof Host
>UserMetrics : typeof Host.UserMetrics
>{} : {}

/** @enum {number} */
Host.UserMetrics.Action = {
>Host.UserMetrics.Action = {    WindowDocked: 1,    WindowUndocked: 2,    ScriptsBreakpointSet: 3,    TimelineStarted: 4,} : { WindowDocked: number; WindowUndocked: number; ScriptsBreakpointSet: number; TimelineStarted: number; }
>Host.UserMetrics.Action : { WindowDocked: number; WindowUndocked: number; ScriptsBreakpointSet: number; TimelineStarted: number; }
>Host.UserMetrics : typeof Host.UserMetrics
>Host : typeof Host
>UserMetrics : typeof Host.UserMetrics
>Action : { WindowDocked: number; WindowUndocked: number; ScriptsBreakpointSet: number; TimelineStarted: number; }
>{    WindowDocked: 1,    WindowUndocked: 2,    ScriptsBreakpointSet: 3,    TimelineStarted: 4,} : { WindowDocked: number; WindowUndocked: number; ScriptsBreakpointSet: number; TimelineStarted: number; }

    WindowDocked: 1,
>WindowDocked : number
>1 : 1

    WindowUndocked: 2,
>WindowUndocked : number
>2 : 2

    ScriptsBreakpointSet: 3,
>ScriptsBreakpointSet : number
>3 : 3

    TimelineStarted: 4,
>TimelineStarted : number
>4 : 4

};
/**
 * @typedef {string} Host.UserMetrics.Bargh
 */
/**
 * @typedef {string}
 */
Host.UserMetrics.Blah = {
>Host.UserMetrics.Blah = {    x: 12} : { x: number; }
>Host.UserMetrics.Blah : { x: number; }
>Host.UserMetrics : typeof Host.UserMetrics
>Host : typeof Host
>UserMetrics : typeof Host.UserMetrics
>Blah : { x: number; }
>{    x: 12} : { x: number; }

    x: 12
>x : number
>12 : 12
}
=== tests/cases/compiler/index.js ===
var Other = {};
>Other : typeof Other
>{} : {}

Other.Cls = class {
>Other.Cls = class {    /**     * @param {!Host.UserMetrics.Action} p     */    method(p) {}    usage() {        this.method(Host.UserMetrics.Action.WindowDocked);    }} : typeof Cls
>Other.Cls : typeof Cls
>Other : typeof Other
>Cls : typeof Cls
>class {    /**     * @param {!Host.UserMetrics.Action} p     */    method(p) {}    usage() {        this.method(Host.UserMetrics.Action.WindowDocked);    }} : typeof Cls

    /**
     * @param {!Host.UserMetrics.Action} p
     */
    method(p) {}
>method : (p: Host.UserMetrics.Action) => void
>p : number

    usage() {
>usage : () => void

        this.method(Host.UserMetrics.Action.WindowDocked);
>this.method(Host.UserMetrics.Action.WindowDocked) : void
>this.method : (p: number) => void
>this : this
>method : (p: number) => void
>Host.UserMetrics.Action.WindowDocked : number
>Host.UserMetrics.Action : { WindowDocked: number; WindowUndocked: number; ScriptsBreakpointSet: number; TimelineStarted: number; }
>Host.UserMetrics : typeof Host.UserMetrics
>Host : typeof Host
>UserMetrics : typeof Host.UserMetrics
>Action : { WindowDocked: number; WindowUndocked: number; ScriptsBreakpointSet: number; TimelineStarted: number; }
>WindowDocked : number
    }
}

/**
 * @type {Host.UserMetrics.Bargh}
 */
var x = "ok";
>x : string
>"ok" : "ok"

/**
 * @type {Host.UserMetrics.Blah}
 */
var y = "ok";
>y : string
>"ok" : "ok"