File: callbackCrossModule.types

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (47 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download
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 : { "tests/cases/conformance/jsdoc/mod1": typeof C; }
>exports : typeof C
>C : typeof C

function C() {
>C : typeof C

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

=== tests/cases/conformance/jsdoc/use.js ===
/** @param {import('./mod1').Con} k */
function f(k) {
>f : (k: import("tests/cases/conformance/jsdoc/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
}