@nestia/migrate 0.11.4 → 0.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/lib/bundles/NEST_TEMPLATE.js +5 -5
  2. package/lib/bundles/NEST_TEMPLATE.js.map +1 -1
  3. package/lib/bundles/SDK_TEMPLATE.js +1 -1
  4. package/lib/utils/openapi-down-convert/converter.js +2 -2
  5. package/package.json +2 -2
  6. package/src/MigrateApplication.ts +81 -81
  7. package/src/analyzers/MigrateAnalyzer.ts +9 -9
  8. package/src/analyzers/MigrateControllerAnalyzer.ts +135 -135
  9. package/src/analyzers/MigrateMethodAnalyzer.ts +439 -439
  10. package/src/archivers/MigrateFileArchiver.ts +38 -38
  11. package/src/bundles/NEST_TEMPLATE.ts +5 -5
  12. package/src/bundles/SDK_TEMPLATE.ts +1 -1
  13. package/src/executable/bundle.ts +110 -110
  14. package/src/internal/MigrateCommander.ts +70 -70
  15. package/src/internal/MigrateInquirer.ts +86 -86
  16. package/src/module.ts +14 -14
  17. package/src/programmers/MigrateApiFileProgrammer.ts +53 -53
  18. package/src/programmers/MigrateApiFunctionProgrammer.ts +199 -199
  19. package/src/programmers/MigrateApiNamespaceProgrammer.ts +431 -431
  20. package/src/programmers/MigrateApiProgrammer.ts +170 -170
  21. package/src/programmers/MigrateApiSimulatationProgrammer.ts +327 -327
  22. package/src/programmers/MigrateApiStartProgrammer.ts +194 -194
  23. package/src/programmers/MigrateDtoProgrammer.ts +78 -78
  24. package/src/programmers/MigrateE2eFileProgrammer.ts +117 -117
  25. package/src/programmers/MigrateE2eProgrammer.ts +36 -36
  26. package/src/programmers/MigrateImportProgrammer.ts +121 -121
  27. package/src/programmers/MigrateNestControllerProgrammer.ts +50 -50
  28. package/src/programmers/MigrateNestMethodProgrammer.ts +250 -250
  29. package/src/programmers/MigrateNestModuleProgrammer.ts +63 -63
  30. package/src/programmers/MigrateNestProgrammer.ts +74 -74
  31. package/src/programmers/MigrateSchemaProgrammer.ts +267 -267
  32. package/src/structures/IMigrateDto.ts +8 -8
  33. package/src/structures/IMigrateProgram.ts +27 -27
  34. package/src/structures/IMigrateRoute.ts +51 -51
  35. package/src/structures/ISwagger.ts +23 -23
  36. package/src/structures/ISwaggerComponents.ts +14 -14
  37. package/src/structures/ISwaggerRoute.ts +20 -20
  38. package/src/structures/ISwaggerRouteBodyContent.ts +15 -15
  39. package/src/structures/ISwaggerRouteParameter.ts +14 -14
  40. package/src/structures/ISwaggerRouteRequestBody.ts +12 -12
  41. package/src/structures/ISwaggerRouteResponse.ts +11 -11
  42. package/src/structures/ISwaggerSchema.ts +90 -90
  43. package/src/structures/ISwaggerSecurityScheme.ts +47 -47
  44. package/src/structures/ISwaggerV20.ts +10 -10
  45. package/src/structures/ISwaggerV31.ts +10 -10
  46. package/src/utils/FilePrinter.ts +36 -36
  47. package/src/utils/OpenApiConverter.ts +19 -19
  48. package/src/utils/StringUtil.ts +60 -60
  49. package/src/utils/SwaggerComponentsExplorer.ts +43 -43
  50. package/src/utils/SwaggerTypeChecker.ts +67 -67
  51. package/src/utils/openapi-down-convert/RefVisitor.ts +139 -139
  52. package/src/utils/openapi-down-convert/converter.ts +527 -527
@@ -1,327 +1,327 @@
1
- import ts from "typescript";
2
- import { IdentifierFactory } from "typia/lib/factories/IdentifierFactory";
3
- import { StatementFactory } from "typia/lib/factories/StatementFactory";
4
- import { TypeFactory } from "typia/lib/factories/TypeFactory";
5
-
6
- import { IMigrateController } from "../structures/IMigrateController";
7
- import { IMigrateRoute } from "../structures/IMigrateRoute";
8
- import { ISwaggerComponents } from "../structures/ISwaggerComponents";
9
- import { MigrateApiFunctionProgrammer } from "./MigrateApiFunctionProgrammer";
10
- import { MigrateApiNamespaceProgrammer } from "./MigrateApiNamespaceProgrammer";
11
- import { MigrateImportProgrammer } from "./MigrateImportProgrammer";
12
- import { MigrateSchemaProgrammer } from "./MigrateSchemaProgrammer";
13
-
14
- export namespace MigrateApiSimulatationProgrammer {
15
- export interface IProps {
16
- controller: IMigrateController;
17
- route: IMigrateRoute;
18
- alias: string;
19
- }
20
- export const random =
21
- (components: ISwaggerComponents) =>
22
- (importer: MigrateImportProgrammer) =>
23
- (props: IProps) => {
24
- const output = props.route.success
25
- ? MigrateSchemaProgrammer.write(components)(importer)(
26
- props.route.success.schema,
27
- )
28
- : TypeFactory.keyword("void");
29
- return constant("random")(
30
- ts.factory.createArrowFunction(
31
- undefined,
32
- undefined,
33
- [
34
- ts.factory.createParameterDeclaration(
35
- undefined,
36
- undefined,
37
- "g",
38
- ts.factory.createToken(ts.SyntaxKind.QuestionToken),
39
- ts.factory.createTypeReferenceNode(
40
- ts.factory.createIdentifier("Partial"),
41
- [
42
- ts.factory.createTypeReferenceNode(
43
- `${importer.external({
44
- type: "default",
45
- library: "typia",
46
- name: "typia",
47
- })}.IRandomGenerator`,
48
- ),
49
- ],
50
- ),
51
- ),
52
- ],
53
- output,
54
- undefined,
55
- ts.factory.createCallExpression(
56
- IdentifierFactory.access(
57
- ts.factory.createIdentifier(
58
- importer.external({
59
- type: "default",
60
- library: "typia",
61
- name: "typia",
62
- }),
63
- ),
64
- )("random"),
65
- [output],
66
- [ts.factory.createIdentifier("g")],
67
- ),
68
- ),
69
- );
70
- };
71
-
72
- export const simulate =
73
- (components: ISwaggerComponents) =>
74
- (importer: MigrateImportProgrammer) =>
75
- (props: IProps): ts.VariableStatement => {
76
- const caller = () =>
77
- ts.factory.createCallExpression(
78
- ts.factory.createIdentifier("random"),
79
- undefined,
80
- [
81
- ts.factory.createConditionalExpression(
82
- ts.factory.createLogicalAnd(
83
- ts.factory.createStrictEquality(
84
- ts.factory.createStringLiteral("object"),
85
- ts.factory.createTypeOfExpression(
86
- ts.factory.createIdentifier("connection.simulate"),
87
- ),
88
- ),
89
- ts.factory.createStrictInequality(
90
- ts.factory.createNull(),
91
- ts.factory.createIdentifier("connection.simulate"),
92
- ),
93
- ),
94
- undefined,
95
- ts.factory.createIdentifier("connection.simulate"),
96
- undefined,
97
- ts.factory.createIdentifier("undefined"),
98
- ),
99
- ],
100
- );
101
- return constant("simulate")(
102
- ts.factory.createArrowFunction(
103
- undefined,
104
- undefined,
105
- MigrateApiFunctionProgrammer.writeParameterDeclarations(components)(
106
- importer,
107
- )(props),
108
- ts.factory.createTypeReferenceNode(
109
- props.route.success ? "Output" : "void",
110
- ),
111
- undefined,
112
- ts.factory.createBlock(
113
- [
114
- ...assert(components)(importer)(props),
115
- ts.factory.createReturnStatement(caller()),
116
- ],
117
- true,
118
- ),
119
- ),
120
- );
121
- };
122
-
123
- const assert =
124
- (components: ISwaggerComponents) =>
125
- (importer: MigrateImportProgrammer) =>
126
- (props: IProps): ts.Statement[] => {
127
- const parameters = [
128
- ...props.route.parameters.map((p) => ({
129
- category: "param",
130
- name: p.key,
131
- schema: MigrateSchemaProgrammer.write(components)(importer)(p.schema),
132
- })),
133
- ...(props.route.query
134
- ? [
135
- {
136
- category: "query",
137
- name: props.route.query.key,
138
- schema: MigrateSchemaProgrammer.write(components)(importer)(
139
- props.route.query.schema,
140
- ),
141
- },
142
- ]
143
- : []),
144
- ...(props.route.body
145
- ? [
146
- {
147
- category: "body",
148
- name: props.route.body.key,
149
- schema: MigrateSchemaProgrammer.write(components)(importer)(
150
- props.route.body.schema,
151
- ),
152
- },
153
- ]
154
- : []),
155
- ];
156
- if (parameters.length === 0) return [];
157
-
158
- const validator = StatementFactory.constant(
159
- "assert",
160
- ts.factory.createCallExpression(
161
- IdentifierFactory.access(
162
- ts.factory.createIdentifier(
163
- importer.external({
164
- type: "instance",
165
- library: `@nestia/fetcher/lib/NestiaSimulator`,
166
- name: "NestiaSimulator",
167
- }),
168
- ),
169
- )("assert"),
170
- undefined,
171
- [
172
- ts.factory.createObjectLiteralExpression(
173
- [
174
- ts.factory.createPropertyAssignment(
175
- "method",
176
- ts.factory.createIdentifier("METADATA.method"),
177
- ),
178
- ts.factory.createPropertyAssignment(
179
- "host",
180
- ts.factory.createIdentifier("connection.host"),
181
- ),
182
- ts.factory.createPropertyAssignment(
183
- "path",
184
- MigrateApiNamespaceProgrammer.writePathCallExpression(props),
185
- ),
186
- ts.factory.createPropertyAssignment(
187
- "contentType",
188
- ts.factory.createStringLiteral(
189
- props.route.success?.type ?? "application/json",
190
- ),
191
- ),
192
- ],
193
- true,
194
- ),
195
- ],
196
- ),
197
- );
198
- const individual = parameters
199
- .map((p) =>
200
- ts.factory.createCallExpression(
201
- (() => {
202
- const base = IdentifierFactory.access(
203
- ts.factory.createIdentifier("assert"),
204
- )(p.category);
205
- if (p.category !== "param") return base;
206
- return ts.factory.createCallExpression(base, undefined, [
207
- ts.factory.createStringLiteral(p.name),
208
- ]);
209
- })(),
210
- undefined,
211
- [
212
- ts.factory.createArrowFunction(
213
- undefined,
214
- undefined,
215
- [],
216
- undefined,
217
- undefined,
218
- ts.factory.createCallExpression(
219
- IdentifierFactory.access(
220
- ts.factory.createIdentifier(
221
- importer.external({
222
- type: "default",
223
- library: "typia",
224
- name: "typia",
225
- }),
226
- ),
227
- )("assert"),
228
- undefined,
229
- [
230
- ts.factory.createIdentifier(
231
- p.category === "headers" ? "connection.headers" : p.name,
232
- ),
233
- ],
234
- ),
235
- ),
236
- ],
237
- ),
238
- )
239
- .map(ts.factory.createExpressionStatement);
240
- return [validator, tryAndCatch(importer)(individual)];
241
- };
242
-
243
- const tryAndCatch =
244
- (importer: MigrateImportProgrammer) => (individual: ts.Statement[]) =>
245
- ts.factory.createTryStatement(
246
- ts.factory.createBlock(individual, true),
247
- ts.factory.createCatchClause(
248
- "exp",
249
- ts.factory.createBlock(
250
- [
251
- ts.factory.createIfStatement(
252
- ts.factory.createLogicalNot(
253
- ts.factory.createCallExpression(
254
- IdentifierFactory.access(
255
- ts.factory.createIdentifier(
256
- importer.external({
257
- type: "default",
258
- library: "typia",
259
- name: "typia",
260
- }),
261
- ),
262
- )("is"),
263
- [
264
- ts.factory.createTypeReferenceNode(
265
- importer.external({
266
- type: "instance",
267
- library: "@nestia/fetcher",
268
- name: "HttpError",
269
- }),
270
- ),
271
- ],
272
- [ts.factory.createIdentifier("exp")],
273
- ),
274
- ),
275
- ts.factory.createThrowStatement(
276
- ts.factory.createIdentifier("exp"),
277
- ),
278
- ),
279
- ts.factory.createReturnStatement(
280
- ts.factory.createAsExpression(
281
- ts.factory.createObjectLiteralExpression(
282
- [
283
- ts.factory.createPropertyAssignment(
284
- "success",
285
- ts.factory.createFalse(),
286
- ),
287
- ts.factory.createPropertyAssignment(
288
- "status",
289
- ts.factory.createIdentifier("exp.status"),
290
- ),
291
- ts.factory.createPropertyAssignment(
292
- "headers",
293
- ts.factory.createIdentifier("exp.headers"),
294
- ),
295
- ts.factory.createPropertyAssignment(
296
- "data",
297
- ts.factory.createIdentifier("exp.toJSON().message"),
298
- ),
299
- ],
300
- true,
301
- ),
302
- TypeFactory.keyword("any"),
303
- ),
304
- ),
305
- ],
306
- true,
307
- ),
308
- ),
309
- undefined,
310
- );
311
- }
312
-
313
- const constant = (name: string) => (expression: ts.Expression) =>
314
- ts.factory.createVariableStatement(
315
- [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)],
316
- ts.factory.createVariableDeclarationList(
317
- [
318
- ts.factory.createVariableDeclaration(
319
- ts.factory.createIdentifier(name),
320
- undefined,
321
- undefined,
322
- expression,
323
- ),
324
- ],
325
- ts.NodeFlags.Const,
326
- ),
327
- );
1
+ import ts from "typescript";
2
+ import { IdentifierFactory } from "typia/lib/factories/IdentifierFactory";
3
+ import { StatementFactory } from "typia/lib/factories/StatementFactory";
4
+ import { TypeFactory } from "typia/lib/factories/TypeFactory";
5
+
6
+ import { IMigrateController } from "../structures/IMigrateController";
7
+ import { IMigrateRoute } from "../structures/IMigrateRoute";
8
+ import { ISwaggerComponents } from "../structures/ISwaggerComponents";
9
+ import { MigrateApiFunctionProgrammer } from "./MigrateApiFunctionProgrammer";
10
+ import { MigrateApiNamespaceProgrammer } from "./MigrateApiNamespaceProgrammer";
11
+ import { MigrateImportProgrammer } from "./MigrateImportProgrammer";
12
+ import { MigrateSchemaProgrammer } from "./MigrateSchemaProgrammer";
13
+
14
+ export namespace MigrateApiSimulatationProgrammer {
15
+ export interface IProps {
16
+ controller: IMigrateController;
17
+ route: IMigrateRoute;
18
+ alias: string;
19
+ }
20
+ export const random =
21
+ (components: ISwaggerComponents) =>
22
+ (importer: MigrateImportProgrammer) =>
23
+ (props: IProps) => {
24
+ const output = props.route.success
25
+ ? MigrateSchemaProgrammer.write(components)(importer)(
26
+ props.route.success.schema,
27
+ )
28
+ : TypeFactory.keyword("void");
29
+ return constant("random")(
30
+ ts.factory.createArrowFunction(
31
+ undefined,
32
+ undefined,
33
+ [
34
+ ts.factory.createParameterDeclaration(
35
+ undefined,
36
+ undefined,
37
+ "g",
38
+ ts.factory.createToken(ts.SyntaxKind.QuestionToken),
39
+ ts.factory.createTypeReferenceNode(
40
+ ts.factory.createIdentifier("Partial"),
41
+ [
42
+ ts.factory.createTypeReferenceNode(
43
+ `${importer.external({
44
+ type: "default",
45
+ library: "typia",
46
+ name: "typia",
47
+ })}.IRandomGenerator`,
48
+ ),
49
+ ],
50
+ ),
51
+ ),
52
+ ],
53
+ output,
54
+ undefined,
55
+ ts.factory.createCallExpression(
56
+ IdentifierFactory.access(
57
+ ts.factory.createIdentifier(
58
+ importer.external({
59
+ type: "default",
60
+ library: "typia",
61
+ name: "typia",
62
+ }),
63
+ ),
64
+ )("random"),
65
+ [output],
66
+ [ts.factory.createIdentifier("g")],
67
+ ),
68
+ ),
69
+ );
70
+ };
71
+
72
+ export const simulate =
73
+ (components: ISwaggerComponents) =>
74
+ (importer: MigrateImportProgrammer) =>
75
+ (props: IProps): ts.VariableStatement => {
76
+ const caller = () =>
77
+ ts.factory.createCallExpression(
78
+ ts.factory.createIdentifier("random"),
79
+ undefined,
80
+ [
81
+ ts.factory.createConditionalExpression(
82
+ ts.factory.createLogicalAnd(
83
+ ts.factory.createStrictEquality(
84
+ ts.factory.createStringLiteral("object"),
85
+ ts.factory.createTypeOfExpression(
86
+ ts.factory.createIdentifier("connection.simulate"),
87
+ ),
88
+ ),
89
+ ts.factory.createStrictInequality(
90
+ ts.factory.createNull(),
91
+ ts.factory.createIdentifier("connection.simulate"),
92
+ ),
93
+ ),
94
+ undefined,
95
+ ts.factory.createIdentifier("connection.simulate"),
96
+ undefined,
97
+ ts.factory.createIdentifier("undefined"),
98
+ ),
99
+ ],
100
+ );
101
+ return constant("simulate")(
102
+ ts.factory.createArrowFunction(
103
+ undefined,
104
+ undefined,
105
+ MigrateApiFunctionProgrammer.writeParameterDeclarations(components)(
106
+ importer,
107
+ )(props),
108
+ ts.factory.createTypeReferenceNode(
109
+ props.route.success ? "Output" : "void",
110
+ ),
111
+ undefined,
112
+ ts.factory.createBlock(
113
+ [
114
+ ...assert(components)(importer)(props),
115
+ ts.factory.createReturnStatement(caller()),
116
+ ],
117
+ true,
118
+ ),
119
+ ),
120
+ );
121
+ };
122
+
123
+ const assert =
124
+ (components: ISwaggerComponents) =>
125
+ (importer: MigrateImportProgrammer) =>
126
+ (props: IProps): ts.Statement[] => {
127
+ const parameters = [
128
+ ...props.route.parameters.map((p) => ({
129
+ category: "param",
130
+ name: p.key,
131
+ schema: MigrateSchemaProgrammer.write(components)(importer)(p.schema),
132
+ })),
133
+ ...(props.route.query
134
+ ? [
135
+ {
136
+ category: "query",
137
+ name: props.route.query.key,
138
+ schema: MigrateSchemaProgrammer.write(components)(importer)(
139
+ props.route.query.schema,
140
+ ),
141
+ },
142
+ ]
143
+ : []),
144
+ ...(props.route.body
145
+ ? [
146
+ {
147
+ category: "body",
148
+ name: props.route.body.key,
149
+ schema: MigrateSchemaProgrammer.write(components)(importer)(
150
+ props.route.body.schema,
151
+ ),
152
+ },
153
+ ]
154
+ : []),
155
+ ];
156
+ if (parameters.length === 0) return [];
157
+
158
+ const validator = StatementFactory.constant(
159
+ "assert",
160
+ ts.factory.createCallExpression(
161
+ IdentifierFactory.access(
162
+ ts.factory.createIdentifier(
163
+ importer.external({
164
+ type: "instance",
165
+ library: `@nestia/fetcher/lib/NestiaSimulator`,
166
+ name: "NestiaSimulator",
167
+ }),
168
+ ),
169
+ )("assert"),
170
+ undefined,
171
+ [
172
+ ts.factory.createObjectLiteralExpression(
173
+ [
174
+ ts.factory.createPropertyAssignment(
175
+ "method",
176
+ ts.factory.createIdentifier("METADATA.method"),
177
+ ),
178
+ ts.factory.createPropertyAssignment(
179
+ "host",
180
+ ts.factory.createIdentifier("connection.host"),
181
+ ),
182
+ ts.factory.createPropertyAssignment(
183
+ "path",
184
+ MigrateApiNamespaceProgrammer.writePathCallExpression(props),
185
+ ),
186
+ ts.factory.createPropertyAssignment(
187
+ "contentType",
188
+ ts.factory.createStringLiteral(
189
+ props.route.success?.type ?? "application/json",
190
+ ),
191
+ ),
192
+ ],
193
+ true,
194
+ ),
195
+ ],
196
+ ),
197
+ );
198
+ const individual = parameters
199
+ .map((p) =>
200
+ ts.factory.createCallExpression(
201
+ (() => {
202
+ const base = IdentifierFactory.access(
203
+ ts.factory.createIdentifier("assert"),
204
+ )(p.category);
205
+ if (p.category !== "param") return base;
206
+ return ts.factory.createCallExpression(base, undefined, [
207
+ ts.factory.createStringLiteral(p.name),
208
+ ]);
209
+ })(),
210
+ undefined,
211
+ [
212
+ ts.factory.createArrowFunction(
213
+ undefined,
214
+ undefined,
215
+ [],
216
+ undefined,
217
+ undefined,
218
+ ts.factory.createCallExpression(
219
+ IdentifierFactory.access(
220
+ ts.factory.createIdentifier(
221
+ importer.external({
222
+ type: "default",
223
+ library: "typia",
224
+ name: "typia",
225
+ }),
226
+ ),
227
+ )("assert"),
228
+ undefined,
229
+ [
230
+ ts.factory.createIdentifier(
231
+ p.category === "headers" ? "connection.headers" : p.name,
232
+ ),
233
+ ],
234
+ ),
235
+ ),
236
+ ],
237
+ ),
238
+ )
239
+ .map(ts.factory.createExpressionStatement);
240
+ return [validator, tryAndCatch(importer)(individual)];
241
+ };
242
+
243
+ const tryAndCatch =
244
+ (importer: MigrateImportProgrammer) => (individual: ts.Statement[]) =>
245
+ ts.factory.createTryStatement(
246
+ ts.factory.createBlock(individual, true),
247
+ ts.factory.createCatchClause(
248
+ "exp",
249
+ ts.factory.createBlock(
250
+ [
251
+ ts.factory.createIfStatement(
252
+ ts.factory.createLogicalNot(
253
+ ts.factory.createCallExpression(
254
+ IdentifierFactory.access(
255
+ ts.factory.createIdentifier(
256
+ importer.external({
257
+ type: "default",
258
+ library: "typia",
259
+ name: "typia",
260
+ }),
261
+ ),
262
+ )("is"),
263
+ [
264
+ ts.factory.createTypeReferenceNode(
265
+ importer.external({
266
+ type: "instance",
267
+ library: "@nestia/fetcher",
268
+ name: "HttpError",
269
+ }),
270
+ ),
271
+ ],
272
+ [ts.factory.createIdentifier("exp")],
273
+ ),
274
+ ),
275
+ ts.factory.createThrowStatement(
276
+ ts.factory.createIdentifier("exp"),
277
+ ),
278
+ ),
279
+ ts.factory.createReturnStatement(
280
+ ts.factory.createAsExpression(
281
+ ts.factory.createObjectLiteralExpression(
282
+ [
283
+ ts.factory.createPropertyAssignment(
284
+ "success",
285
+ ts.factory.createFalse(),
286
+ ),
287
+ ts.factory.createPropertyAssignment(
288
+ "status",
289
+ ts.factory.createIdentifier("exp.status"),
290
+ ),
291
+ ts.factory.createPropertyAssignment(
292
+ "headers",
293
+ ts.factory.createIdentifier("exp.headers"),
294
+ ),
295
+ ts.factory.createPropertyAssignment(
296
+ "data",
297
+ ts.factory.createIdentifier("exp.toJSON().message"),
298
+ ),
299
+ ],
300
+ true,
301
+ ),
302
+ TypeFactory.keyword("any"),
303
+ ),
304
+ ),
305
+ ],
306
+ true,
307
+ ),
308
+ ),
309
+ undefined,
310
+ );
311
+ }
312
+
313
+ const constant = (name: string) => (expression: ts.Expression) =>
314
+ ts.factory.createVariableStatement(
315
+ [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)],
316
+ ts.factory.createVariableDeclarationList(
317
+ [
318
+ ts.factory.createVariableDeclaration(
319
+ ts.factory.createIdentifier(name),
320
+ undefined,
321
+ undefined,
322
+ expression,
323
+ ),
324
+ ],
325
+ ts.NodeFlags.Const,
326
+ ),
327
+ );