File: jsDeclarationsFunctionClassesCjsExportAssignment.symbols

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 (119 lines) | stat: -rw-r--r-- 3,806 bytes parent folder | download | duplicates (3)
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
113
114
115
116
117
118
119
=== tests/cases/conformance/jsdoc/declarations/timer.js ===
/**
 * @param {number} timeout
 */
function Timer(timeout) {
>Timer : Symbol(Timer, Decl(timer.js, 0, 0))
>timeout : Symbol(timeout, Decl(timer.js, 3, 15))

    this.timeout = timeout;
>this.timeout : Symbol(Timer.timeout, Decl(timer.js, 3, 25))
>this : Symbol(Timer, Decl(timer.js, 0, 0))
>timeout : Symbol(Timer.timeout, Decl(timer.js, 3, 25))
>timeout : Symbol(timeout, Decl(timer.js, 3, 15))
}
module.exports = Timer;
>module.exports : Symbol(module.exports, Decl(timer.js, 0, 0))
>module : Symbol(export=, Decl(timer.js, 5, 1))
>exports : Symbol(export=, Decl(timer.js, 5, 1))
>Timer : Symbol(Timer, Decl(timer.js, 0, 0))

=== tests/cases/conformance/jsdoc/declarations/hook.js ===
/**
 * @typedef {(arg: import("./context")) => void} HookHandler
 */
/**
 * @param {HookHandler} handle
 */
function Hook(handle) {
>Hook : Symbol(Hook, Decl(hook.js, 0, 0))
>handle : Symbol(handle, Decl(hook.js, 6, 14))

    this.handle = handle;
>this.handle : Symbol(Hook.handle, Decl(hook.js, 6, 23))
>this : Symbol(Hook, Decl(hook.js, 0, 0))
>handle : Symbol(Hook.handle, Decl(hook.js, 6, 23))
>handle : Symbol(handle, Decl(hook.js, 6, 14))
}
module.exports = Hook;
>module.exports : Symbol(module.exports, Decl(hook.js, 0, 0))
>module : Symbol(export=, Decl(hook.js, 8, 1))
>exports : Symbol(export=, Decl(hook.js, 8, 1))
>Hook : Symbol(Hook, Decl(hook.js, 0, 0))

=== tests/cases/conformance/jsdoc/declarations/context.js ===
/**
 * Imports
 *
 * @typedef {import("./timer")} Timer
 * @typedef {import("./hook")} Hook
 * @typedef {import("./hook").HookHandler} HookHandler
 */

/**
 * Input type definition
 *
 * @typedef {Object} Input
 * @prop {Timer} timer
 * @prop {Hook} hook
 */
 
/**
 * State type definition
 *
 * @typedef {Object} State
 * @prop {Timer} timer
 * @prop {Hook} hook
 */

/**
 * New `Context`
 *
 * @class
 * @param {Input} input
 */

function Context(input) {
>Context : Symbol(Context, Decl(context.js, 0, 0), Decl(context.js, 36, 1))
>input : Symbol(input, Decl(context.js, 31, 17))

    if (!(this instanceof Context)) {
>this : Symbol(Context, Decl(context.js, 0, 0), Decl(context.js, 36, 1))
>Context : Symbol(Context, Decl(context.js, 0, 0), Decl(context.js, 36, 1))

      return new Context(input)
>Context : Symbol(Context, Decl(context.js, 0, 0), Decl(context.js, 36, 1))
>input : Symbol(input, Decl(context.js, 31, 17))
    }
    this.state = this.construct(input);
>this.state : Symbol(Context.state, Decl(context.js, 34, 5))
>state : Symbol(Context.state, Decl(context.js, 34, 5))
>this.construct : Symbol(construct, Decl(context.js, 37, 21), Decl(context.js, 37, 21))
>construct : Symbol(construct, Decl(context.js, 37, 21), Decl(context.js, 37, 21))
>input : Symbol(input, Decl(context.js, 31, 17))
}
Context.prototype = {
>Context.prototype : Symbol(Context.prototype, Decl(context.js, 36, 1))
>Context : Symbol(Context, Decl(context.js, 0, 0), Decl(context.js, 36, 1))
>prototype : Symbol(Context.prototype, Decl(context.js, 36, 1))

    /**
     * @param {Input} input
     * @param {HookHandler=} handle
     * @returns {State}
     */
    construct(input, handle = () => void 0) {
>construct : Symbol(construct, Decl(context.js, 37, 21))
>input : Symbol(input, Decl(context.js, 43, 14))
>handle : Symbol(handle, Decl(context.js, 43, 20))

        return input;
>input : Symbol(input, Decl(context.js, 43, 14))
    }
}
module.exports = Context;
>module.exports : Symbol(module.exports, Decl(context.js, 0, 0))
>module : Symbol(export=, Decl(context.js, 46, 1))
>exports : Symbol(export=, Decl(context.js, 46, 1))
>Context : Symbol(Context, Decl(context.js, 0, 0), Decl(context.js, 36, 1))