@openrewrite/rewrite 0.21.0 → 0.22.0

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.
@@ -28,9 +28,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
28
28
  __setModuleDefault(result, mod);
29
29
  return result;
30
30
  };
31
- var CompilationUnit_1, Alias_1, ArrowFunction_1, Await_1, DefaultType_1, Delete_1, Export_1, FunctionType_1, JsImport_1, JsBinary_1, ObjectBindingDeclarations_1, PropertyAssignment_1, ScopedVariableDeclarations_1, TemplateExpression_1, Tuple_1, TypeDeclaration_1, TypeOf_1, TypeOperator_1, Unary_1, Union_1, Void_1, Yield_1, TypeInfo_1, JSVariableDeclarations_1, JSMethodDeclaration_1, NamespaceDeclaration_1;
31
+ var CompilationUnit_1, Alias_1, ArrowFunction_1, Await_1, DefaultType_1, Delete_1, Export_1, FunctionType_1, JsImport_1, JsImportSpecifier_1, JsBinary_1, ObjectBindingDeclarations_1, PropertyAssignment_1, ScopedVariableDeclarations_1, TemplateExpression_1, Tuple_1, TypeDeclaration_1, TypeOf_1, TypeOperator_1, Unary_1, Union_1, Void_1, Yield_1, TypeInfo_1, JSVariableDeclarations_1, JSMethodDeclaration_1, JSMethodInvocation_1, NamespaceDeclaration_1, FunctionDeclaration_1;
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.NamespaceDeclaration = exports.JSMethodDeclaration = exports.JSVariableDeclarations = exports.TypeInfo = exports.Yield = exports.Void = exports.Union = exports.Unary = exports.TypeOperator = exports.TypeOf = exports.TypeDeclaration = exports.Tuple = exports.TemplateExpression = exports.ScopedVariableDeclarations = exports.PropertyAssignment = exports.ObjectBindingDeclarations = exports.JsBinary = exports.JsImport = exports.FunctionType = exports.Export = exports.Delete = exports.DefaultType = exports.Await = exports.ArrowFunction = exports.Alias = exports.CompilationUnit = void 0;
33
+ exports.FunctionDeclaration = exports.NamespaceDeclaration = exports.JSMethodInvocation = exports.JSMethodDeclaration = exports.JSVariableDeclarations = exports.TypeInfo = exports.Yield = exports.Void = exports.Union = exports.Unary = exports.TypeOperator = exports.TypeOf = exports.TypeDeclaration = exports.Tuple = exports.TemplateExpression = exports.ScopedVariableDeclarations = exports.PropertyAssignment = exports.ObjectBindingDeclarations = exports.JsBinary = exports.JsImportSpecifier = exports.JsImport = exports.FunctionType = exports.Export = exports.Delete = exports.DefaultType = exports.Await = exports.ArrowFunction = exports.Alias = exports.CompilationUnit = void 0;
34
34
  const extensions = __importStar(require("./extensions"));
35
35
  const support_types_1 = require("./support_types");
36
36
  const core_1 = require("../../core");
@@ -209,13 +209,14 @@ exports.Alias = Alias = Alias_1 = __decorate([
209
209
  (0, core_1.LstType)("org.openrewrite.javascript.tree.JS$Alias")
210
210
  ], Alias);
211
211
  let ArrowFunction = ArrowFunction_1 = class ArrowFunction extends (0, support_types_1.JSMixin)(Object) {
212
- constructor(id, prefix, markers, leadingAnnotations, modifiers, parameters, returnTypeExpression, arrow, body, _type) {
212
+ constructor(id, prefix, markers, leadingAnnotations, modifiers, typeParameters, parameters, returnTypeExpression, arrow, body, _type) {
213
213
  super();
214
214
  this._id = id;
215
215
  this._prefix = prefix;
216
216
  this._markers = markers;
217
217
  this._leadingAnnotations = leadingAnnotations;
218
218
  this._modifiers = modifiers;
219
+ this._typeParameters = typeParameters;
219
220
  this._parameters = parameters;
220
221
  this._returnTypeExpression = returnTypeExpression;
221
222
  this._arrow = arrow;
@@ -226,61 +227,67 @@ let ArrowFunction = ArrowFunction_1 = class ArrowFunction extends (0, support_ty
226
227
  return this._id;
227
228
  }
228
229
  withId(id) {
229
- return id === this._id ? this : new ArrowFunction_1(id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
230
+ return id === this._id ? this : new ArrowFunction_1(id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
230
231
  }
231
232
  get prefix() {
232
233
  return this._prefix;
233
234
  }
234
235
  withPrefix(prefix) {
235
- return prefix === this._prefix ? this : new ArrowFunction_1(this._id, prefix, this._markers, this._leadingAnnotations, this._modifiers, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
236
+ return prefix === this._prefix ? this : new ArrowFunction_1(this._id, prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
236
237
  }
237
238
  get markers() {
238
239
  return this._markers;
239
240
  }
240
241
  withMarkers(markers) {
241
- return markers === this._markers ? this : new ArrowFunction_1(this._id, this._prefix, markers, this._leadingAnnotations, this._modifiers, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
242
+ return markers === this._markers ? this : new ArrowFunction_1(this._id, this._prefix, markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
242
243
  }
243
244
  get leadingAnnotations() {
244
245
  return this._leadingAnnotations;
245
246
  }
246
247
  withLeadingAnnotations(leadingAnnotations) {
247
- return leadingAnnotations === this._leadingAnnotations ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, leadingAnnotations, this._modifiers, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
248
+ return leadingAnnotations === this._leadingAnnotations ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
248
249
  }
249
250
  get modifiers() {
250
251
  return this._modifiers;
251
252
  }
252
253
  withModifiers(modifiers) {
253
- return modifiers === this._modifiers ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, modifiers, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
254
+ return modifiers === this._modifiers ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
255
+ }
256
+ get typeParameters() {
257
+ return this._typeParameters;
258
+ }
259
+ withTypeParameters(typeParameters) {
260
+ return typeParameters === this._typeParameters ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, typeParameters, this._parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
254
261
  }
255
262
  get parameters() {
256
263
  return this._parameters;
257
264
  }
258
265
  withParameters(parameters) {
259
- return parameters === this._parameters ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
266
+ return parameters === this._parameters ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, parameters, this._returnTypeExpression, this._arrow, this._body, this._type);
260
267
  }
261
268
  get returnTypeExpression() {
262
269
  return this._returnTypeExpression;
263
270
  }
264
271
  withReturnTypeExpression(returnTypeExpression) {
265
- return returnTypeExpression === this._returnTypeExpression ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._parameters, returnTypeExpression, this._arrow, this._body, this._type);
272
+ return returnTypeExpression === this._returnTypeExpression ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, returnTypeExpression, this._arrow, this._body, this._type);
266
273
  }
267
274
  get arrow() {
268
275
  return this._arrow;
269
276
  }
270
277
  withArrow(arrow) {
271
- return arrow === this._arrow ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._parameters, this._returnTypeExpression, arrow, this._body, this._type);
278
+ return arrow === this._arrow ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, arrow, this._body, this._type);
272
279
  }
273
280
  get body() {
274
281
  return this._body;
275
282
  }
276
283
  withBody(body) {
277
- return body === this._body ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._parameters, this._returnTypeExpression, this._arrow, body, this._type);
284
+ return body === this._body ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._arrow, body, this._type);
278
285
  }
279
286
  get type() {
280
287
  return this._type;
281
288
  }
282
289
  withType(_type) {
283
- return _type === this._type ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._parameters, this._returnTypeExpression, this._arrow, this._body, _type);
290
+ return _type === this._type ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._arrow, this._body, _type);
284
291
  }
285
292
  acceptJavaScript(v, p) {
286
293
  return v.visitArrowFunction(this, p);
@@ -596,12 +603,13 @@ exports.FunctionType = FunctionType = FunctionType_1 = __decorate([
596
603
  (0, core_1.LstType)("org.openrewrite.javascript.tree.JS$FunctionType")
597
604
  ], FunctionType);
598
605
  let JsImport = JsImport_1 = class JsImport extends (0, support_types_1.JSMixin)(Object) {
599
- constructor(id, prefix, markers, name, imports, _from, target, initializer) {
606
+ constructor(id, prefix, markers, name, importType, imports, _from, target, initializer) {
600
607
  super();
601
608
  this._id = id;
602
609
  this._prefix = prefix;
603
610
  this._markers = markers;
604
611
  this._name = name;
612
+ this._importType = importType;
605
613
  this._imports = imports;
606
614
  this._from = _from;
607
615
  this._target = target;
@@ -611,19 +619,19 @@ let JsImport = JsImport_1 = class JsImport extends (0, support_types_1.JSMixin)(
611
619
  return this._id;
612
620
  }
613
621
  withId(id) {
614
- return id === this._id ? this : new JsImport_1(id, this._prefix, this._markers, this._name, this._imports, this._from, this._target, this._initializer);
622
+ return id === this._id ? this : new JsImport_1(id, this._prefix, this._markers, this._name, this._importType, this._imports, this._from, this._target, this._initializer);
615
623
  }
616
624
  get prefix() {
617
625
  return this._prefix;
618
626
  }
619
627
  withPrefix(prefix) {
620
- return prefix === this._prefix ? this : new JsImport_1(this._id, prefix, this._markers, this._name, this._imports, this._from, this._target, this._initializer);
628
+ return prefix === this._prefix ? this : new JsImport_1(this._id, prefix, this._markers, this._name, this._importType, this._imports, this._from, this._target, this._initializer);
621
629
  }
622
630
  get markers() {
623
631
  return this._markers;
624
632
  }
625
633
  withMarkers(markers) {
626
- return markers === this._markers ? this : new JsImport_1(this._id, this._prefix, markers, this._name, this._imports, this._from, this._target, this._initializer);
634
+ return markers === this._markers ? this : new JsImport_1(this._id, this._prefix, markers, this._name, this._importType, this._imports, this._from, this._target, this._initializer);
627
635
  }
628
636
  get name() {
629
637
  return this._name === null ? null : this._name.element;
@@ -631,6 +639,12 @@ let JsImport = JsImport_1 = class JsImport extends (0, support_types_1.JSMixin)(
631
639
  withName(name) {
632
640
  return this.padding.withName(tree_1.JRightPadded.withElement(this._name, name));
633
641
  }
642
+ get importType() {
643
+ return this._importType.element;
644
+ }
645
+ withImportType(importType) {
646
+ return this.padding.withImportType(this._importType.withElement(importType));
647
+ }
634
648
  get imports() {
635
649
  return this._imports === null ? null : this._imports.elements;
636
650
  }
@@ -641,13 +655,13 @@ let JsImport = JsImport_1 = class JsImport extends (0, support_types_1.JSMixin)(
641
655
  return this._from;
642
656
  }
643
657
  withFrom(_from) {
644
- return _from === this._from ? this : new JsImport_1(this._id, this._prefix, this._markers, this._name, this._imports, _from, this._target, this._initializer);
658
+ return _from === this._from ? this : new JsImport_1(this._id, this._prefix, this._markers, this._name, this._importType, this._imports, _from, this._target, this._initializer);
645
659
  }
646
660
  get target() {
647
661
  return this._target;
648
662
  }
649
663
  withTarget(target) {
650
- return target === this._target ? this : new JsImport_1(this._id, this._prefix, this._markers, this._name, this._imports, this._from, target, this._initializer);
664
+ return target === this._target ? this : new JsImport_1(this._id, this._prefix, this._markers, this._name, this._importType, this._imports, this._from, target, this._initializer);
651
665
  }
652
666
  get initializer() {
653
667
  return this._initializer === null ? null : this._initializer.element;
@@ -665,19 +679,25 @@ let JsImport = JsImport_1 = class JsImport extends (0, support_types_1.JSMixin)(
665
679
  return t._name;
666
680
  }
667
681
  withName(name) {
668
- return t._name === name ? t : new JsImport_1(t._id, t._prefix, t._markers, name, t._imports, t._from, t._target, t._initializer);
682
+ return t._name === name ? t : new JsImport_1(t._id, t._prefix, t._markers, name, t._importType, t._imports, t._from, t._target, t._initializer);
683
+ }
684
+ get importType() {
685
+ return t._importType;
686
+ }
687
+ withImportType(importType) {
688
+ return t._importType === importType ? t : new JsImport_1(t._id, t._prefix, t._markers, t._name, importType, t._imports, t._from, t._target, t._initializer);
669
689
  }
670
690
  get imports() {
671
691
  return t._imports;
672
692
  }
673
693
  withImports(imports) {
674
- return t._imports === imports ? t : new JsImport_1(t._id, t._prefix, t._markers, t._name, imports, t._from, t._target, t._initializer);
694
+ return t._imports === imports ? t : new JsImport_1(t._id, t._prefix, t._markers, t._name, t._importType, imports, t._from, t._target, t._initializer);
675
695
  }
676
696
  get initializer() {
677
697
  return t._initializer;
678
698
  }
679
699
  withInitializer(initializer) {
680
- return t._initializer === initializer ? t : new JsImport_1(t._id, t._prefix, t._markers, t._name, t._imports, t._from, t._target, initializer);
700
+ return t._initializer === initializer ? t : new JsImport_1(t._id, t._prefix, t._markers, t._name, t._importType, t._imports, t._from, t._target, initializer);
681
701
  }
682
702
  };
683
703
  }
@@ -686,6 +706,71 @@ exports.JsImport = JsImport;
686
706
  exports.JsImport = JsImport = JsImport_1 = __decorate([
687
707
  (0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JsImport")
688
708
  ], JsImport);
709
+ let JsImportSpecifier = JsImportSpecifier_1 = class JsImportSpecifier extends (0, support_types_1.JSMixin)(Object) {
710
+ constructor(id, prefix, markers, importType, specifier, _type) {
711
+ super();
712
+ this._id = id;
713
+ this._prefix = prefix;
714
+ this._markers = markers;
715
+ this._importType = importType;
716
+ this._specifier = specifier;
717
+ this._type = _type;
718
+ }
719
+ get id() {
720
+ return this._id;
721
+ }
722
+ withId(id) {
723
+ return id === this._id ? this : new JsImportSpecifier_1(id, this._prefix, this._markers, this._importType, this._specifier, this._type);
724
+ }
725
+ get prefix() {
726
+ return this._prefix;
727
+ }
728
+ withPrefix(prefix) {
729
+ return prefix === this._prefix ? this : new JsImportSpecifier_1(this._id, prefix, this._markers, this._importType, this._specifier, this._type);
730
+ }
731
+ get markers() {
732
+ return this._markers;
733
+ }
734
+ withMarkers(markers) {
735
+ return markers === this._markers ? this : new JsImportSpecifier_1(this._id, this._prefix, markers, this._importType, this._specifier, this._type);
736
+ }
737
+ get importType() {
738
+ return this._importType.element;
739
+ }
740
+ withImportType(importType) {
741
+ return this.padding.withImportType(this._importType.withElement(importType));
742
+ }
743
+ get specifier() {
744
+ return this._specifier;
745
+ }
746
+ withSpecifier(specifier) {
747
+ return specifier === this._specifier ? this : new JsImportSpecifier_1(this._id, this._prefix, this._markers, this._importType, specifier, this._type);
748
+ }
749
+ get type() {
750
+ return this._type;
751
+ }
752
+ withType(_type) {
753
+ return _type === this._type ? this : new JsImportSpecifier_1(this._id, this._prefix, this._markers, this._importType, this._specifier, _type);
754
+ }
755
+ acceptJavaScript(v, p) {
756
+ return v.visitJsImportSpecifier(this, p);
757
+ }
758
+ get padding() {
759
+ const t = this;
760
+ return new class {
761
+ get importType() {
762
+ return t._importType;
763
+ }
764
+ withImportType(importType) {
765
+ return t._importType === importType ? t : new JsImportSpecifier_1(t._id, t._prefix, t._markers, importType, t._specifier, t._type);
766
+ }
767
+ };
768
+ }
769
+ };
770
+ exports.JsImportSpecifier = JsImportSpecifier;
771
+ exports.JsImportSpecifier = JsImportSpecifier = JsImportSpecifier_1 = __decorate([
772
+ (0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JsImportSpecifier")
773
+ ], JsImportSpecifier);
689
774
  let JsBinary = JsBinary_1 = class JsBinary extends (0, support_types_1.JSMixin)(Object) {
690
775
  constructor(id, prefix, markers, left, operator, right, _type) {
691
776
  super();
@@ -1564,6 +1649,7 @@ exports.Unary = Unary = Unary_1 = __decorate([
1564
1649
  Type[Type["Optional"] = 1] = "Optional";
1565
1650
  Type[Type["Exclamation"] = 2] = "Exclamation";
1566
1651
  Type[Type["QuestionDot"] = 3] = "QuestionDot";
1652
+ Type[Type["QuestionDotWithDot"] = 4] = "QuestionDotWithDot";
1567
1653
  })(Type = Unary.Type || (Unary.Type = {}));
1568
1654
  })(Unary || (exports.Unary = Unary = {}));
1569
1655
  let Union = Union_1 = class Union extends (0, support_types_1.JSMixin)(Object) {
@@ -2073,6 +2159,103 @@ exports.JSMethodDeclaration = JSMethodDeclaration;
2073
2159
  exports.JSMethodDeclaration = JSMethodDeclaration = JSMethodDeclaration_1 = __decorate([
2074
2160
  (0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JSMethodDeclaration")
2075
2161
  ], JSMethodDeclaration);
2162
+ let JSMethodInvocation = JSMethodInvocation_1 = class JSMethodInvocation extends (0, support_types_1.JSMixin)(Object) {
2163
+ constructor(id, prefix, markers, select, typeParameters, name, _arguments, methodType) {
2164
+ super();
2165
+ this._id = id;
2166
+ this._prefix = prefix;
2167
+ this._markers = markers;
2168
+ this._select = select;
2169
+ this._typeParameters = typeParameters;
2170
+ this._name = name;
2171
+ this._arguments = _arguments;
2172
+ this._methodType = methodType;
2173
+ }
2174
+ get id() {
2175
+ return this._id;
2176
+ }
2177
+ withId(id) {
2178
+ return id === this._id ? this : new JSMethodInvocation_1(id, this._prefix, this._markers, this._select, this._typeParameters, this._name, this._arguments, this._methodType);
2179
+ }
2180
+ get prefix() {
2181
+ return this._prefix;
2182
+ }
2183
+ withPrefix(prefix) {
2184
+ return prefix === this._prefix ? this : new JSMethodInvocation_1(this._id, prefix, this._markers, this._select, this._typeParameters, this._name, this._arguments, this._methodType);
2185
+ }
2186
+ get markers() {
2187
+ return this._markers;
2188
+ }
2189
+ withMarkers(markers) {
2190
+ return markers === this._markers ? this : new JSMethodInvocation_1(this._id, this._prefix, markers, this._select, this._typeParameters, this._name, this._arguments, this._methodType);
2191
+ }
2192
+ get select() {
2193
+ return this._select === null ? null : this._select.element;
2194
+ }
2195
+ withSelect(select) {
2196
+ return this.padding.withSelect(tree_1.JRightPadded.withElement(this._select, select));
2197
+ }
2198
+ get typeParameters() {
2199
+ return this._typeParameters === null ? null : this._typeParameters.elements;
2200
+ }
2201
+ withTypeParameters(typeParameters) {
2202
+ return this.padding.withTypeParameters(tree_1.JContainer.withElementsNullable(this._typeParameters, typeParameters));
2203
+ }
2204
+ get name() {
2205
+ return this._name;
2206
+ }
2207
+ withName(name) {
2208
+ return name === this._name ? this : new JSMethodInvocation_1(this._id, this._prefix, this._markers, this._select, this._typeParameters, name, this._arguments, this._methodType);
2209
+ }
2210
+ get arguments() {
2211
+ return this._arguments.elements;
2212
+ }
2213
+ withArguments(_arguments) {
2214
+ return this.padding.withArguments(tree_1.JContainer.withElements(this._arguments, _arguments));
2215
+ }
2216
+ get methodType() {
2217
+ return this._methodType;
2218
+ }
2219
+ withMethodType(methodType) {
2220
+ return methodType === this._methodType ? this : new JSMethodInvocation_1(this._id, this._prefix, this._markers, this._select, this._typeParameters, this._name, this._arguments, methodType);
2221
+ }
2222
+ acceptJavaScript(v, p) {
2223
+ return v.visitJSMethodInvocation(this, p);
2224
+ }
2225
+ get type() {
2226
+ return extensions.getJavaType(this);
2227
+ }
2228
+ withType(type) {
2229
+ return extensions.withJavaType(this, type);
2230
+ }
2231
+ get padding() {
2232
+ const t = this;
2233
+ return new class {
2234
+ get select() {
2235
+ return t._select;
2236
+ }
2237
+ withSelect(select) {
2238
+ return t._select === select ? t : new JSMethodInvocation_1(t._id, t._prefix, t._markers, select, t._typeParameters, t._name, t._arguments, t._methodType);
2239
+ }
2240
+ get typeParameters() {
2241
+ return t._typeParameters;
2242
+ }
2243
+ withTypeParameters(typeParameters) {
2244
+ return t._typeParameters === typeParameters ? t : new JSMethodInvocation_1(t._id, t._prefix, t._markers, t._select, typeParameters, t._name, t._arguments, t._methodType);
2245
+ }
2246
+ get arguments() {
2247
+ return t._arguments;
2248
+ }
2249
+ withArguments(_arguments) {
2250
+ return t._arguments === _arguments ? t : new JSMethodInvocation_1(t._id, t._prefix, t._markers, t._select, t._typeParameters, t._name, _arguments, t._methodType);
2251
+ }
2252
+ };
2253
+ }
2254
+ };
2255
+ exports.JSMethodInvocation = JSMethodInvocation;
2256
+ exports.JSMethodInvocation = JSMethodInvocation = JSMethodInvocation_1 = __decorate([
2257
+ (0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JSMethodInvocation")
2258
+ ], JSMethodInvocation);
2076
2259
  let NamespaceDeclaration = NamespaceDeclaration_1 = class NamespaceDeclaration extends (0, support_types_1.JSMixin)(Object) {
2077
2260
  constructor(id, prefix, markers, modifiers, keywordType, name, body) {
2078
2261
  super();
@@ -2158,4 +2341,97 @@ exports.NamespaceDeclaration = NamespaceDeclaration = NamespaceDeclaration_1 = _
2158
2341
  KeywordType[KeywordType["Module"] = 1] = "Module";
2159
2342
  })(KeywordType = NamespaceDeclaration.KeywordType || (NamespaceDeclaration.KeywordType = {}));
2160
2343
  })(NamespaceDeclaration || (exports.NamespaceDeclaration = NamespaceDeclaration = {}));
2344
+ let FunctionDeclaration = FunctionDeclaration_1 = class FunctionDeclaration extends (0, support_types_1.JSMixin)(Object) {
2345
+ constructor(id, prefix, markers, modifiers, name, typeParameters, parameters, returnTypeExpression, body, _type) {
2346
+ super();
2347
+ this._id = id;
2348
+ this._prefix = prefix;
2349
+ this._markers = markers;
2350
+ this._modifiers = modifiers;
2351
+ this._name = name;
2352
+ this._typeParameters = typeParameters;
2353
+ this._parameters = parameters;
2354
+ this._returnTypeExpression = returnTypeExpression;
2355
+ this._body = body;
2356
+ this._type = _type;
2357
+ }
2358
+ get id() {
2359
+ return this._id;
2360
+ }
2361
+ withId(id) {
2362
+ return id === this._id ? this : new FunctionDeclaration_1(id, this._prefix, this._markers, this._modifiers, this._name, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
2363
+ }
2364
+ get prefix() {
2365
+ return this._prefix;
2366
+ }
2367
+ withPrefix(prefix) {
2368
+ return prefix === this._prefix ? this : new FunctionDeclaration_1(this._id, prefix, this._markers, this._modifiers, this._name, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
2369
+ }
2370
+ get markers() {
2371
+ return this._markers;
2372
+ }
2373
+ withMarkers(markers) {
2374
+ return markers === this._markers ? this : new FunctionDeclaration_1(this._id, this._prefix, markers, this._modifiers, this._name, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
2375
+ }
2376
+ get modifiers() {
2377
+ return this._modifiers;
2378
+ }
2379
+ withModifiers(modifiers) {
2380
+ return modifiers === this._modifiers ? this : new FunctionDeclaration_1(this._id, this._prefix, this._markers, modifiers, this._name, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
2381
+ }
2382
+ get name() {
2383
+ return this._name;
2384
+ }
2385
+ withName(name) {
2386
+ return name === this._name ? this : new FunctionDeclaration_1(this._id, this._prefix, this._markers, this._modifiers, name, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
2387
+ }
2388
+ get typeParameters() {
2389
+ return this._typeParameters;
2390
+ }
2391
+ withTypeParameters(typeParameters) {
2392
+ return typeParameters === this._typeParameters ? this : new FunctionDeclaration_1(this._id, this._prefix, this._markers, this._modifiers, this._name, typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
2393
+ }
2394
+ get parameters() {
2395
+ return this._parameters.elements;
2396
+ }
2397
+ withParameters(parameters) {
2398
+ return this.padding.withParameters(tree_1.JContainer.withElements(this._parameters, parameters));
2399
+ }
2400
+ get returnTypeExpression() {
2401
+ return this._returnTypeExpression;
2402
+ }
2403
+ withReturnTypeExpression(returnTypeExpression) {
2404
+ return returnTypeExpression === this._returnTypeExpression ? this : new FunctionDeclaration_1(this._id, this._prefix, this._markers, this._modifiers, this._name, this._typeParameters, this._parameters, returnTypeExpression, this._body, this._type);
2405
+ }
2406
+ get body() {
2407
+ return this._body;
2408
+ }
2409
+ withBody(body) {
2410
+ return body === this._body ? this : new FunctionDeclaration_1(this._id, this._prefix, this._markers, this._modifiers, this._name, this._typeParameters, this._parameters, this._returnTypeExpression, body, this._type);
2411
+ }
2412
+ get type() {
2413
+ return this._type;
2414
+ }
2415
+ withType(_type) {
2416
+ return _type === this._type ? this : new FunctionDeclaration_1(this._id, this._prefix, this._markers, this._modifiers, this._name, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, _type);
2417
+ }
2418
+ acceptJavaScript(v, p) {
2419
+ return v.visitFunctionDeclaration(this, p);
2420
+ }
2421
+ get padding() {
2422
+ const t = this;
2423
+ return new class {
2424
+ get parameters() {
2425
+ return t._parameters;
2426
+ }
2427
+ withParameters(parameters) {
2428
+ return t._parameters === parameters ? t : new FunctionDeclaration_1(t._id, t._prefix, t._markers, t._modifiers, t._name, t._typeParameters, parameters, t._returnTypeExpression, t._body, t._type);
2429
+ }
2430
+ };
2431
+ }
2432
+ };
2433
+ exports.FunctionDeclaration = FunctionDeclaration;
2434
+ exports.FunctionDeclaration = FunctionDeclaration = FunctionDeclaration_1 = __decorate([
2435
+ (0, core_1.LstType)("org.openrewrite.javascript.tree.JS$FunctionDeclaration")
2436
+ ], FunctionDeclaration);
2161
2437
  //# sourceMappingURL=tree.js.map