File: requireOfJsonFileTypes.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 (103 lines) | stat: -rw-r--r-- 3,179 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
=== tests/cases/compiler/file1.ts ===
import b = require('./b.json');
>b : Symbol(b, Decl(file1.ts, 0, 0))

import c = require('./c.json');
>c : Symbol(c, Decl(file1.ts, 0, 31))

import d = require('./d.json');
>d : Symbol(d, Decl(file1.ts, 1, 31))

import e = require('./e.json');
>e : Symbol(e, Decl(file1.ts, 2, 31))

import f = require('./f.json');
>f : Symbol(f, Decl(file1.ts, 3, 31))

import g = require('./g.json');
>g : Symbol(g, Decl(file1.ts, 4, 31))

let booleanLiteral: boolean, nullLiteral: null;
>booleanLiteral : Symbol(booleanLiteral, Decl(file1.ts, 7, 3))
>nullLiteral : Symbol(nullLiteral, Decl(file1.ts, 7, 28))

let stringLiteral: string;
>stringLiteral : Symbol(stringLiteral, Decl(file1.ts, 8, 3))

let numberLiteral: number;
>numberLiteral : Symbol(numberLiteral, Decl(file1.ts, 9, 3))

booleanLiteral = b.a;
>booleanLiteral : Symbol(booleanLiteral, Decl(file1.ts, 7, 3))
>b.a : Symbol("a", Decl(b.json, 0, 1))
>b : Symbol(b, Decl(file1.ts, 0, 0))
>a : Symbol("a", Decl(b.json, 0, 1))

stringLiteral = b.b;
>stringLiteral : Symbol(stringLiteral, Decl(file1.ts, 8, 3))
>b.b : Symbol("b", Decl(b.json, 1, 14))
>b : Symbol(b, Decl(file1.ts, 0, 0))
>b : Symbol("b", Decl(b.json, 1, 14))

nullLiteral = b.c;
>nullLiteral : Symbol(nullLiteral, Decl(file1.ts, 7, 28))
>b.c : Symbol("c", Decl(b.json, 2, 17))
>b : Symbol(b, Decl(file1.ts, 0, 0))
>c : Symbol("c", Decl(b.json, 2, 17))

booleanLiteral = b.d;
>booleanLiteral : Symbol(booleanLiteral, Decl(file1.ts, 7, 3))
>b.d : Symbol("d", Decl(b.json, 3, 14))
>b : Symbol(b, Decl(file1.ts, 0, 0))
>d : Symbol("d", Decl(b.json, 3, 14))

const stringOrNumberOrNull: string | number | null = c[0];
>stringOrNumberOrNull : Symbol(stringOrNumberOrNull, Decl(file1.ts, 15, 5))
>c : Symbol(c, Decl(file1.ts, 0, 31))

stringLiteral = d;
>stringLiteral : Symbol(stringLiteral, Decl(file1.ts, 8, 3))
>d : Symbol(d, Decl(file1.ts, 1, 31))

numberLiteral = e;
>numberLiteral : Symbol(numberLiteral, Decl(file1.ts, 9, 3))
>e : Symbol(e, Decl(file1.ts, 2, 31))

numberLiteral = f[0];
>numberLiteral : Symbol(numberLiteral, Decl(file1.ts, 9, 3))
>f : Symbol(f, Decl(file1.ts, 3, 31))

booleanLiteral = g[0];
>booleanLiteral : Symbol(booleanLiteral, Decl(file1.ts, 7, 3))
>g : Symbol(g, Decl(file1.ts, 4, 31))

=== tests/cases/compiler/b.json ===
{
    "a": true,
>"a" : Symbol("a", Decl(b.json, 0, 1))

    "b": "hello",
>"b" : Symbol("b", Decl(b.json, 1, 14))

    "c": null,
>"c" : Symbol("c", Decl(b.json, 2, 17))

    "d": false
>"d" : Symbol("d", Decl(b.json, 3, 14))
}

=== tests/cases/compiler/c.json ===
["a", null, "string"]
No type information for this code.
No type information for this code.=== tests/cases/compiler/d.json ===
"dConfig"
No type information for this code.
No type information for this code.=== tests/cases/compiler/e.json ===
-10
No type information for this code.
No type information for this code.=== tests/cases/compiler/f.json ===
[-10, 30]
No type information for this code.
No type information for this code.=== tests/cases/compiler/g.json ===
[true, false]
No type information for this code.