File: varRequireFromJavascript.symbols

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (57 lines) | stat: -rw-r--r-- 1,512 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
=== tests/cases/conformance/salsa/use.js ===
var ex = require('./ex')
>ex : Symbol(ex, Decl(use.js, 0, 3))
>require : Symbol(require)
>'./ex' : Symbol(ex, Decl(ex.js, 0, 0))

// values work
var crunch = new ex.Crunch(1);
>crunch : Symbol(crunch, Decl(use.js, 3, 3))
>ex.Crunch : Symbol(ex.Crunch, Decl(ex.js, 0, 0))
>ex : Symbol(ex, Decl(use.js, 0, 3))
>Crunch : Symbol(ex.Crunch, Decl(ex.js, 0, 0))

crunch.n
>crunch.n : Symbol(ex.Crunch.n, Decl(ex.js, 2, 20))
>crunch : Symbol(crunch, Decl(use.js, 3, 3))
>n : Symbol(ex.Crunch.n, Decl(ex.js, 2, 20))


// types work
/**
 * @param {ex.Crunch} wrap
 */
function f(wrap) {
>f : Symbol(f, Decl(use.js, 4, 8))
>wrap : Symbol(wrap, Decl(use.js, 11, 11))

    wrap.n
>wrap.n : Symbol(ex.Crunch.n, Decl(ex.js, 2, 20))
>wrap : Symbol(wrap, Decl(use.js, 11, 11))
>n : Symbol(ex.Crunch.n, Decl(ex.js, 2, 20))
}

=== tests/cases/conformance/salsa/ex.js ===
export class Crunch {
>Crunch : Symbol(Crunch, Decl(ex.js, 0, 0))

    /** @param {number} n */
    constructor(n) {
>n : Symbol(n, Decl(ex.js, 2, 16))

        this.n = n
>this.n : Symbol(Crunch.n, Decl(ex.js, 2, 20))
>this : Symbol(Crunch, Decl(ex.js, 0, 0))
>n : Symbol(Crunch.n, Decl(ex.js, 2, 20))
>n : Symbol(n, Decl(ex.js, 2, 16))
    }
    m() {
>m : Symbol(Crunch.m, Decl(ex.js, 4, 5))

        return this.n
>this.n : Symbol(Crunch.n, Decl(ex.js, 2, 20))
>this : Symbol(Crunch, Decl(ex.js, 0, 0))
>n : Symbol(Crunch.n, Decl(ex.js, 2, 20))
    }
}