/
parameter-default.ts.shot
100 lines (99 loc) · 2.11 KB
/
parameter-default.ts.shot
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
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`type-annotation parameter-default 1`] = `
ScopeManager {
variables: Array [
Variable$1 {
defs: Array [
TypeDefinition$1 {
name: Identifier<"T">,
node: TSTypeAliasDeclaration$1,
},
],
name: "T",
references: Array [
Reference$2 {
identifier: Identifier<"T">,
isTypeReference: true,
resolved: Variable$1,
},
],
isValueVariable: false,
isTypeVariable: true,
},
Variable$2 {
defs: Array [
FunctionNameDefinition$2 {
name: Identifier<"foo">,
node: FunctionDeclaration$2,
},
],
name: "foo",
references: Array [],
isValueVariable: true,
isTypeVariable: false,
},
Variable$3 {
defs: Array [],
name: "arguments",
references: Array [],
isValueVariable: true,
isTypeVariable: true,
},
Variable$4 {
defs: Array [
ParameterDefinition$3 {
name: Identifier<"a">,
node: FunctionDeclaration$2,
},
],
name: "a",
references: Array [
Reference$1 {
identifier: Identifier<"a">,
init: true,
isTypeReference: false,
resolved: Variable$4,
writeExpr: Literal$3,
},
],
isValueVariable: true,
isTypeVariable: false,
},
],
scopes: Array [
GlobalScope$1 {
block: Program$4,
isStrict: false,
references: Array [],
set: Map {
"T" => Variable$1,
"foo" => Variable$2,
},
type: "global",
upper: null,
variables: Array [
Variable$1,
Variable$2,
],
},
FunctionScope$2 {
block: FunctionDeclaration$2,
isStrict: false,
references: Array [
Reference$1,
Reference$2,
],
set: Map {
"arguments" => Variable$3,
"a" => Variable$4,
},
type: "function",
upper: GlobalScope$1,
variables: Array [
Variable$3,
Variable$4,
],
},
],
}
`;