@openrewrite/rewrite 0.20.8 → 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.
- package/dist/src/javascript/parser.d.ts +29 -29
- package/dist/src/javascript/parser.d.ts.map +1 -1
- package/dist/src/javascript/parser.js +160 -116
- package/dist/src/javascript/parser.js.map +1 -1
- package/dist/src/javascript/remote/receiver.d.ts.map +1 -1
- package/dist/src/javascript/remote/receiver.js +51 -6
- package/dist/src/javascript/remote/receiver.js.map +1 -1
- package/dist/src/javascript/remote/sender.d.ts.map +1 -1
- package/dist/src/javascript/remote/sender.js +38 -2
- package/dist/src/javascript/remote/sender.js.map +1 -1
- package/dist/src/javascript/tree/support_types.d.ts +50 -36
- package/dist/src/javascript/tree/support_types.d.ts.map +1 -1
- package/dist/src/javascript/tree/support_types.js +48 -34
- package/dist/src/javascript/tree/support_types.js.map +1 -1
- package/dist/src/javascript/tree/tree.d.ts +213 -17
- package/dist/src/javascript/tree/tree.d.ts.map +1 -1
- package/dist/src/javascript/tree/tree.js +346 -41
- package/dist/src/javascript/tree/tree.js.map +1 -1
- package/dist/src/javascript/visitor.d.ts +4 -1
- package/dist/src/javascript/visitor.d.ts.map +1 -1
- package/dist/src/javascript/visitor.js +61 -5
- package/dist/src/javascript/visitor.js.map +1 -1
- package/package.json +1 -1
|
@@ -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();
|
|
@@ -765,6 +850,7 @@ exports.JsBinary = JsBinary = JsBinary_1 = __decorate([
|
|
|
765
850
|
Type[Type["IdentityEquals"] = 1] = "IdentityEquals";
|
|
766
851
|
Type[Type["IdentityNotEquals"] = 2] = "IdentityNotEquals";
|
|
767
852
|
Type[Type["In"] = 3] = "In";
|
|
853
|
+
Type[Type["QuestionQuestion"] = 4] = "QuestionQuestion";
|
|
768
854
|
})(Type = JsBinary.Type || (JsBinary.Type = {}));
|
|
769
855
|
})(JsBinary || (exports.JsBinary = JsBinary = {}));
|
|
770
856
|
let ObjectBindingDeclarations = ObjectBindingDeclarations_1 = class ObjectBindingDeclarations extends (0, support_types_1.JSMixin)(Object) {
|
|
@@ -1023,11 +1109,12 @@ exports.PropertyAssignment = PropertyAssignment = PropertyAssignment_1 = __decor
|
|
|
1023
1109
|
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$PropertyAssignment")
|
|
1024
1110
|
], PropertyAssignment);
|
|
1025
1111
|
let ScopedVariableDeclarations = ScopedVariableDeclarations_1 = class ScopedVariableDeclarations extends (0, support_types_1.JSMixin)(Object) {
|
|
1026
|
-
constructor(id, prefix, markers, scope, variables) {
|
|
1112
|
+
constructor(id, prefix, markers, modifiers, scope, variables) {
|
|
1027
1113
|
super();
|
|
1028
1114
|
this._id = id;
|
|
1029
1115
|
this._prefix = prefix;
|
|
1030
1116
|
this._markers = markers;
|
|
1117
|
+
this._modifiers = modifiers;
|
|
1031
1118
|
this._scope = scope;
|
|
1032
1119
|
this._variables = variables;
|
|
1033
1120
|
}
|
|
@@ -1035,25 +1122,31 @@ let ScopedVariableDeclarations = ScopedVariableDeclarations_1 = class ScopedVari
|
|
|
1035
1122
|
return this._id;
|
|
1036
1123
|
}
|
|
1037
1124
|
withId(id) {
|
|
1038
|
-
return id === this._id ? this : new ScopedVariableDeclarations_1(id, this._prefix, this._markers, this._scope, this._variables);
|
|
1125
|
+
return id === this._id ? this : new ScopedVariableDeclarations_1(id, this._prefix, this._markers, this._modifiers, this._scope, this._variables);
|
|
1039
1126
|
}
|
|
1040
1127
|
get prefix() {
|
|
1041
1128
|
return this._prefix;
|
|
1042
1129
|
}
|
|
1043
1130
|
withPrefix(prefix) {
|
|
1044
|
-
return prefix === this._prefix ? this : new ScopedVariableDeclarations_1(this._id, prefix, this._markers, this._scope, this._variables);
|
|
1131
|
+
return prefix === this._prefix ? this : new ScopedVariableDeclarations_1(this._id, prefix, this._markers, this._modifiers, this._scope, this._variables);
|
|
1045
1132
|
}
|
|
1046
1133
|
get markers() {
|
|
1047
1134
|
return this._markers;
|
|
1048
1135
|
}
|
|
1049
1136
|
withMarkers(markers) {
|
|
1050
|
-
return markers === this._markers ? this : new ScopedVariableDeclarations_1(this._id, this._prefix, markers, this._scope, this._variables);
|
|
1137
|
+
return markers === this._markers ? this : new ScopedVariableDeclarations_1(this._id, this._prefix, markers, this._modifiers, this._scope, this._variables);
|
|
1138
|
+
}
|
|
1139
|
+
get modifiers() {
|
|
1140
|
+
return this._modifiers;
|
|
1141
|
+
}
|
|
1142
|
+
withModifiers(modifiers) {
|
|
1143
|
+
return modifiers === this._modifiers ? this : new ScopedVariableDeclarations_1(this._id, this._prefix, this._markers, modifiers, this._scope, this._variables);
|
|
1051
1144
|
}
|
|
1052
1145
|
get scope() {
|
|
1053
|
-
return this._scope;
|
|
1146
|
+
return this._scope === null ? null : this._scope.element;
|
|
1054
1147
|
}
|
|
1055
1148
|
withScope(scope) {
|
|
1056
|
-
return
|
|
1149
|
+
return this.padding.withScope(tree_1.JLeftPadded.withElement(this._scope, scope));
|
|
1057
1150
|
}
|
|
1058
1151
|
get variables() {
|
|
1059
1152
|
return tree_1.JRightPadded.getElements(this._variables);
|
|
@@ -1067,11 +1160,17 @@ let ScopedVariableDeclarations = ScopedVariableDeclarations_1 = class ScopedVari
|
|
|
1067
1160
|
get padding() {
|
|
1068
1161
|
const t = this;
|
|
1069
1162
|
return new class {
|
|
1163
|
+
get scope() {
|
|
1164
|
+
return t._scope;
|
|
1165
|
+
}
|
|
1166
|
+
withScope(scope) {
|
|
1167
|
+
return t._scope === scope ? t : new ScopedVariableDeclarations_1(t._id, t._prefix, t._markers, t._modifiers, scope, t._variables);
|
|
1168
|
+
}
|
|
1070
1169
|
get variables() {
|
|
1071
1170
|
return t._variables;
|
|
1072
1171
|
}
|
|
1073
1172
|
withVariables(variables) {
|
|
1074
|
-
return t._variables === variables ? t : new ScopedVariableDeclarations_1(t._id, t._prefix, t._markers, t._scope, variables);
|
|
1173
|
+
return t._variables === variables ? t : new ScopedVariableDeclarations_1(t._id, t._prefix, t._markers, t._modifiers, t._scope, variables);
|
|
1075
1174
|
}
|
|
1076
1175
|
};
|
|
1077
1176
|
}
|
|
@@ -1548,6 +1647,9 @@ exports.Unary = Unary = Unary_1 = __decorate([
|
|
|
1548
1647
|
(function (Type) {
|
|
1549
1648
|
Type[Type["Spread"] = 0] = "Spread";
|
|
1550
1649
|
Type[Type["Optional"] = 1] = "Optional";
|
|
1650
|
+
Type[Type["Exclamation"] = 2] = "Exclamation";
|
|
1651
|
+
Type[Type["QuestionDot"] = 3] = "QuestionDot";
|
|
1652
|
+
Type[Type["QuestionDotWithDot"] = 4] = "QuestionDotWithDot";
|
|
1551
1653
|
})(Type = Unary.Type || (Unary.Type = {}));
|
|
1552
1654
|
})(Unary || (exports.Unary = Unary = {}));
|
|
1553
1655
|
let Union = Union_1 = class Union extends (0, support_types_1.JSMixin)(Object) {
|
|
@@ -2057,14 +2159,111 @@ exports.JSMethodDeclaration = JSMethodDeclaration;
|
|
|
2057
2159
|
exports.JSMethodDeclaration = JSMethodDeclaration = JSMethodDeclaration_1 = __decorate([
|
|
2058
2160
|
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JSMethodDeclaration")
|
|
2059
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);
|
|
2060
2259
|
let NamespaceDeclaration = NamespaceDeclaration_1 = class NamespaceDeclaration extends (0, support_types_1.JSMixin)(Object) {
|
|
2061
|
-
constructor(id, prefix, markers, modifiers,
|
|
2260
|
+
constructor(id, prefix, markers, modifiers, keywordType, name, body) {
|
|
2062
2261
|
super();
|
|
2063
2262
|
this._id = id;
|
|
2064
2263
|
this._prefix = prefix;
|
|
2065
2264
|
this._markers = markers;
|
|
2066
2265
|
this._modifiers = modifiers;
|
|
2067
|
-
this.
|
|
2266
|
+
this._keywordType = keywordType;
|
|
2068
2267
|
this._name = name;
|
|
2069
2268
|
this._body = body;
|
|
2070
2269
|
}
|
|
@@ -2072,31 +2271,31 @@ let NamespaceDeclaration = NamespaceDeclaration_1 = class NamespaceDeclaration e
|
|
|
2072
2271
|
return this._id;
|
|
2073
2272
|
}
|
|
2074
2273
|
withId(id) {
|
|
2075
|
-
return id === this._id ? this : new NamespaceDeclaration_1(id, this._prefix, this._markers, this._modifiers, this.
|
|
2274
|
+
return id === this._id ? this : new NamespaceDeclaration_1(id, this._prefix, this._markers, this._modifiers, this._keywordType, this._name, this._body);
|
|
2076
2275
|
}
|
|
2077
2276
|
get prefix() {
|
|
2078
2277
|
return this._prefix;
|
|
2079
2278
|
}
|
|
2080
2279
|
withPrefix(prefix) {
|
|
2081
|
-
return prefix === this._prefix ? this : new NamespaceDeclaration_1(this._id, prefix, this._markers, this._modifiers, this.
|
|
2280
|
+
return prefix === this._prefix ? this : new NamespaceDeclaration_1(this._id, prefix, this._markers, this._modifiers, this._keywordType, this._name, this._body);
|
|
2082
2281
|
}
|
|
2083
2282
|
get markers() {
|
|
2084
2283
|
return this._markers;
|
|
2085
2284
|
}
|
|
2086
2285
|
withMarkers(markers) {
|
|
2087
|
-
return markers === this._markers ? this : new NamespaceDeclaration_1(this._id, this._prefix, markers, this._modifiers, this.
|
|
2286
|
+
return markers === this._markers ? this : new NamespaceDeclaration_1(this._id, this._prefix, markers, this._modifiers, this._keywordType, this._name, this._body);
|
|
2088
2287
|
}
|
|
2089
2288
|
get modifiers() {
|
|
2090
2289
|
return this._modifiers;
|
|
2091
2290
|
}
|
|
2092
2291
|
withModifiers(modifiers) {
|
|
2093
|
-
return modifiers === this._modifiers ? this : new NamespaceDeclaration_1(this._id, this._prefix, this._markers, modifiers, this.
|
|
2292
|
+
return modifiers === this._modifiers ? this : new NamespaceDeclaration_1(this._id, this._prefix, this._markers, modifiers, this._keywordType, this._name, this._body);
|
|
2094
2293
|
}
|
|
2095
|
-
get
|
|
2096
|
-
return this.
|
|
2294
|
+
get keywordType() {
|
|
2295
|
+
return this._keywordType.element;
|
|
2097
2296
|
}
|
|
2098
|
-
|
|
2099
|
-
return
|
|
2297
|
+
withKeywordType(keywordType) {
|
|
2298
|
+
return this.padding.withKeywordType(this._keywordType.withElement(keywordType));
|
|
2100
2299
|
}
|
|
2101
2300
|
get name() {
|
|
2102
2301
|
return this._name.element;
|
|
@@ -2108,7 +2307,7 @@ let NamespaceDeclaration = NamespaceDeclaration_1 = class NamespaceDeclaration e
|
|
|
2108
2307
|
return this._body;
|
|
2109
2308
|
}
|
|
2110
2309
|
withBody(body) {
|
|
2111
|
-
return body === this._body ? this : new NamespaceDeclaration_1(this._id, this._prefix, this._markers, this._modifiers, this.
|
|
2310
|
+
return body === this._body ? this : new NamespaceDeclaration_1(this._id, this._prefix, this._markers, this._modifiers, this._keywordType, this._name, body);
|
|
2112
2311
|
}
|
|
2113
2312
|
acceptJavaScript(v, p) {
|
|
2114
2313
|
return v.visitNamespaceDeclaration(this, p);
|
|
@@ -2116,11 +2315,17 @@ let NamespaceDeclaration = NamespaceDeclaration_1 = class NamespaceDeclaration e
|
|
|
2116
2315
|
get padding() {
|
|
2117
2316
|
const t = this;
|
|
2118
2317
|
return new class {
|
|
2318
|
+
get keywordType() {
|
|
2319
|
+
return t._keywordType;
|
|
2320
|
+
}
|
|
2321
|
+
withKeywordType(keywordType) {
|
|
2322
|
+
return t._keywordType === keywordType ? t : new NamespaceDeclaration_1(t._id, t._prefix, t._markers, t._modifiers, keywordType, t._name, t._body);
|
|
2323
|
+
}
|
|
2119
2324
|
get name() {
|
|
2120
2325
|
return t._name;
|
|
2121
2326
|
}
|
|
2122
2327
|
withName(name) {
|
|
2123
|
-
return t._name === name ? t : new NamespaceDeclaration_1(t._id, t._prefix, t._markers, t._modifiers, t.
|
|
2328
|
+
return t._name === name ? t : new NamespaceDeclaration_1(t._id, t._prefix, t._markers, t._modifiers, t._keywordType, name, t._body);
|
|
2124
2329
|
}
|
|
2125
2330
|
};
|
|
2126
2331
|
}
|
|
@@ -2129,4 +2334,104 @@ exports.NamespaceDeclaration = NamespaceDeclaration;
|
|
|
2129
2334
|
exports.NamespaceDeclaration = NamespaceDeclaration = NamespaceDeclaration_1 = __decorate([
|
|
2130
2335
|
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$NamespaceDeclaration")
|
|
2131
2336
|
], NamespaceDeclaration);
|
|
2337
|
+
(function (NamespaceDeclaration) {
|
|
2338
|
+
let KeywordType;
|
|
2339
|
+
(function (KeywordType) {
|
|
2340
|
+
KeywordType[KeywordType["Namespace"] = 0] = "Namespace";
|
|
2341
|
+
KeywordType[KeywordType["Module"] = 1] = "Module";
|
|
2342
|
+
})(KeywordType = NamespaceDeclaration.KeywordType || (NamespaceDeclaration.KeywordType = {}));
|
|
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);
|
|
2132
2437
|
//# sourceMappingURL=tree.js.map
|