File: callbackCrossModule.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 (47 lines) | stat: -rw-r--r-- 976 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
=== tests/cases/conformance/jsdoc/mod1.js ===
/** @callback Con - some kind of continuation
 * @param {object | undefined} error
 * @return {any} I don't even know what this should return
 */
module.exports = C
>module.exports = C : typeof C
>module.exports : typeof C
>module : { exports: typeof C; }
>exports : typeof C
>C : typeof C

function C() {
>C : typeof C

    this.p = 1
>this.p = 1 : 1
>this.p : any
>this : this
>p : any
>1 : 1
}

=== tests/cases/conformance/jsdoc/use.js ===
/** @param {import('./mod1').Con} k */
function f(k) {
>f : (k: import('./mod1').Con) => any
>k : import("tests/cases/conformance/jsdoc/mod1").Con

    if (1 === 2 - 1) {
>1 === 2 - 1 : boolean
>1 : 1
>2 - 1 : number
>2 : 2
>1 : 1

        // I guess basic math works!
    }
    return k({ ok: true})
>k({ ok: true}) : any
>k : import("tests/cases/conformance/jsdoc/mod1").Con
>{ ok: true} : { ok: boolean; }
>ok : boolean
>true : true
}