@@ -8,6 +8,8 @@ export function makeIdentifier(name: string): SWC.Identifier {
8
8
return {
9
9
type : "Identifier" ,
10
10
span : span ( ) ,
11
+ // @ts -ignore SWC is missing the "ctxt" property's
12
+ ctxt : 0 ,
11
13
value : name ,
12
14
optional : false
13
15
} ;
@@ -19,6 +21,8 @@ export function makeVariablesDeclaration(names: string[]): SWC.VariableDeclarati
19
21
return {
20
22
type : "VariableDeclaration" ,
21
23
span : span ( ) ,
24
+ // @ts -ignore SWC is missing the "ctxt" property's
25
+ ctxt : 0 ,
22
26
kind : "let" ,
23
27
declare : false ,
24
28
declarations : names . map < SWC . VariableDeclarator > ( name => ( {
@@ -35,6 +39,8 @@ export function makeVariableInitDeclaration(name: string, value: SWC.Expression)
35
39
return {
36
40
type : "VariableDeclaration" ,
37
41
span : span ( ) ,
42
+ // @ts -ignore SWC is missing the "ctxt" property's
43
+ ctxt : 0 ,
38
44
kind : "let" ,
39
45
declare : false ,
40
46
declarations : [
@@ -105,6 +111,8 @@ export function makeTryCatchStatement(
105
111
block : {
106
112
type : "BlockStatement" ,
107
113
span : span ( ) ,
114
+ // @ts -ignore SWC is missing the "ctxt" property's
115
+ ctxt : 0 ,
108
116
stmts : tryStatements
109
117
} ,
110
118
handler : {
@@ -114,6 +122,8 @@ export function makeTryCatchStatement(
114
122
body : {
115
123
type : "BlockStatement" ,
116
124
span : span ( ) ,
125
+ // @ts -ignore SWC is missing the "ctxt" property's
126
+ ctxt : 0 ,
117
127
stmts : catchStatements
118
128
}
119
129
} ,
@@ -129,15 +139,19 @@ export function makeArrowFunction(
129
139
return {
130
140
type : "ArrowFunctionExpression" ,
131
141
span : span ( ) ,
142
+ ctxt : 0 ,
132
143
params : args . map < SWC . Identifier > ( arg => ( {
133
144
type : "Identifier" ,
134
145
span : span ( ) ,
146
+ ctxt : 0 ,
135
147
value : arg ,
136
148
optional : false
137
149
} ) ) ,
138
150
body : {
139
151
type : "BlockStatement" ,
140
152
span : span ( ) ,
153
+ // @ts -ignore SWC is missing the "ctxt" property's
154
+ ctxt : 0 ,
141
155
stmts : statements
142
156
} ,
143
157
async : ! ! async ,
@@ -159,6 +173,8 @@ export function makeCallExpression(functionExpression: SWC.Expression, args?: SW
159
173
return {
160
174
type : "CallExpression" ,
161
175
span : span ( ) ,
176
+ // @ts -ignore SWC is missing the "ctxt" property's
177
+ ctxt : 0 ,
162
178
// Put IIFE's function expression in (parenthesis)
163
179
callee :
164
180
functionExpression . type === "FunctionExpression" || functionExpression . type === "ArrowFunctionExpression"
0 commit comments