File: varRequireFromTypescript.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 (58 lines) | stat: -rw-r--r-- 1,610 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
58
=== 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.d.ts, 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.d.ts, 0, 33))
>ex : Symbol(ex, Decl(use.js, 0, 3))
>Crunch : Symbol(ex.Crunch, Decl(ex.d.ts, 0, 33))

crunch.n
>crunch.n : Symbol(ex.Crunch.n, Decl(ex.d.ts, 1, 21))
>crunch : Symbol(crunch, Decl(use.js, 3, 3))
>n : Symbol(ex.Crunch.n, Decl(ex.d.ts, 1, 21))


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

    greatest.day
>greatest.day : Symbol(day, Decl(ex.d.ts, 0, 24))
>greatest : Symbol(greatest, Decl(use.js, 12, 11))
>day : Symbol(day, Decl(ex.d.ts, 0, 24))

    wrap.n
>wrap.n : Symbol(ex.Crunch.n, Decl(ex.d.ts, 1, 21))
>wrap : Symbol(wrap, Decl(use.js, 12, 20))
>n : Symbol(ex.Crunch.n, Decl(ex.d.ts, 1, 21))
}

=== tests/cases/conformance/salsa/ex.d.ts ===
export type Greatest = { day: 1 }
>Greatest : Symbol(Greatest, Decl(ex.d.ts, 0, 0))
>day : Symbol(day, Decl(ex.d.ts, 0, 24))

export class Crunch {
>Crunch : Symbol(Crunch, Decl(ex.d.ts, 0, 33))

    n: number
>n : Symbol(Crunch.n, Decl(ex.d.ts, 1, 21))

    m(): number
>m : Symbol(Crunch.m, Decl(ex.d.ts, 2, 13))

    constructor(n: number)
>n : Symbol(n, Decl(ex.d.ts, 4, 16))
}