File: contextualTypeFromJSDoc.symbols

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 (48 lines) | stat: -rw-r--r-- 1,112 bytes parent folder | download | duplicates (5)
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
=== tests/cases/conformance/types/contextualTypes/jsdoc/index.js ===
/** @type {Array<[string, {x?:number, y?:number}]>} */
const arr = [
>arr : Symbol(arr, Decl(index.js, 1, 5))

    ['a', { x: 1 }],
>x : Symbol(x, Decl(index.js, 2, 11))

    ['b', { y: 2 }]
>y : Symbol(y, Decl(index.js, 3, 11))

];

/** @return {Array<[string, {x?:number, y?:number}]>} */
function f() {
>f : Symbol(f, Decl(index.js, 4, 2))

    return [
        ['a', { x: 1 }],
>x : Symbol(x, Decl(index.js, 9, 15))

        ['b', { y: 2 }]
>y : Symbol(y, Decl(index.js, 10, 15))

    ];
}

class C {
>C : Symbol(C, Decl(index.js, 12, 1))

    /** @param {Array<[string, {x?:number, y?:number}]>} value */
    set x(value) { }
>x : Symbol(C.x, Decl(index.js, 14, 9), Decl(index.js, 16, 20))
>value : Symbol(value, Decl(index.js, 16, 10))

    get x() {
>x : Symbol(C.x, Decl(index.js, 14, 9), Decl(index.js, 16, 20))

        return [
            ['a', { x: 1 }],
>x : Symbol(x, Decl(index.js, 19, 19))

            ['b', { y: 2 }]
>y : Symbol(y, Decl(index.js, 20, 19))

        ];
    }
}