@openrewrite/rewrite 0.20.3 → 0.20.4
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/java/tree/support_types.d.ts +2 -0
- package/dist/src/java/tree/support_types.d.ts.map +1 -1
- package/dist/src/java/tree/support_types.js +49 -0
- package/dist/src/java/tree/support_types.js.map +1 -1
- package/dist/src/javascript/parser.d.ts +20 -17
- package/dist/src/javascript/parser.d.ts.map +1 -1
- package/dist/src/javascript/parser.js +73 -38
- 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 +59 -0
- 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 +47 -0
- package/dist/src/javascript/remote/sender.js.map +1 -1
- package/dist/src/javascript/tree/support_types.d.ts +17 -4
- package/dist/src/javascript/tree/support_types.d.ts.map +1 -1
- package/dist/src/javascript/tree/support_types.js +13 -0
- package/dist/src/javascript/tree/support_types.js.map +1 -1
- package/dist/src/javascript/tree/tree.d.ts +246 -1
- package/dist/src/javascript/tree/tree.d.ts.map +1 -1
- package/dist/src/javascript/tree/tree.js +378 -2
- package/dist/src/javascript/tree/tree.js.map +1 -1
- package/dist/src/javascript/visitor.d.ts +5 -1
- package/dist/src/javascript/visitor.d.ts.map +1 -1
- package/dist/src/javascript/visitor.js +56 -0
- 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;
|
|
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;
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
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.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;
|
|
34
34
|
const extensions = __importStar(require("./extensions"));
|
|
35
35
|
const support_types_1 = require("./support_types");
|
|
36
36
|
const core_1 = require("../../core");
|
|
@@ -1547,6 +1547,7 @@ exports.Unary = Unary = Unary_1 = __decorate([
|
|
|
1547
1547
|
let Type;
|
|
1548
1548
|
(function (Type) {
|
|
1549
1549
|
Type[Type["Spread"] = 0] = "Spread";
|
|
1550
|
+
Type[Type["Optional"] = 1] = "Optional";
|
|
1550
1551
|
})(Type = Unary.Type || (Unary.Type = {}));
|
|
1551
1552
|
})(Unary || (exports.Unary = Unary = {}));
|
|
1552
1553
|
let Union = Union_1 = class Union extends (0, support_types_1.JSMixin)(Object) {
|
|
@@ -1753,4 +1754,379 @@ exports.TypeInfo = TypeInfo;
|
|
|
1753
1754
|
exports.TypeInfo = TypeInfo = TypeInfo_1 = __decorate([
|
|
1754
1755
|
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$TypeInfo")
|
|
1755
1756
|
], TypeInfo);
|
|
1757
|
+
let JSVariableDeclarations = JSVariableDeclarations_1 = class JSVariableDeclarations extends (0, support_types_1.JSMixin)(Object) {
|
|
1758
|
+
constructor(id, prefix, markers, leadingAnnotations, modifiers, typeExpression, varargs, variables) {
|
|
1759
|
+
super();
|
|
1760
|
+
this._id = id;
|
|
1761
|
+
this._prefix = prefix;
|
|
1762
|
+
this._markers = markers;
|
|
1763
|
+
this._leadingAnnotations = leadingAnnotations;
|
|
1764
|
+
this._modifiers = modifiers;
|
|
1765
|
+
this._typeExpression = typeExpression;
|
|
1766
|
+
this._varargs = varargs;
|
|
1767
|
+
this._variables = variables;
|
|
1768
|
+
}
|
|
1769
|
+
get id() {
|
|
1770
|
+
return this._id;
|
|
1771
|
+
}
|
|
1772
|
+
withId(id) {
|
|
1773
|
+
return id === this._id ? this : new JSVariableDeclarations_1(id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeExpression, this._varargs, this._variables);
|
|
1774
|
+
}
|
|
1775
|
+
get prefix() {
|
|
1776
|
+
return this._prefix;
|
|
1777
|
+
}
|
|
1778
|
+
withPrefix(prefix) {
|
|
1779
|
+
return prefix === this._prefix ? this : new JSVariableDeclarations_1(this._id, prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeExpression, this._varargs, this._variables);
|
|
1780
|
+
}
|
|
1781
|
+
get markers() {
|
|
1782
|
+
return this._markers;
|
|
1783
|
+
}
|
|
1784
|
+
withMarkers(markers) {
|
|
1785
|
+
return markers === this._markers ? this : new JSVariableDeclarations_1(this._id, this._prefix, markers, this._leadingAnnotations, this._modifiers, this._typeExpression, this._varargs, this._variables);
|
|
1786
|
+
}
|
|
1787
|
+
get leadingAnnotations() {
|
|
1788
|
+
return this._leadingAnnotations;
|
|
1789
|
+
}
|
|
1790
|
+
withLeadingAnnotations(leadingAnnotations) {
|
|
1791
|
+
return leadingAnnotations === this._leadingAnnotations ? this : new JSVariableDeclarations_1(this._id, this._prefix, this._markers, leadingAnnotations, this._modifiers, this._typeExpression, this._varargs, this._variables);
|
|
1792
|
+
}
|
|
1793
|
+
get modifiers() {
|
|
1794
|
+
return this._modifiers;
|
|
1795
|
+
}
|
|
1796
|
+
withModifiers(modifiers) {
|
|
1797
|
+
return modifiers === this._modifiers ? this : new JSVariableDeclarations_1(this._id, this._prefix, this._markers, this._leadingAnnotations, modifiers, this._typeExpression, this._varargs, this._variables);
|
|
1798
|
+
}
|
|
1799
|
+
get typeExpression() {
|
|
1800
|
+
return this._typeExpression;
|
|
1801
|
+
}
|
|
1802
|
+
withTypeExpression(typeExpression) {
|
|
1803
|
+
return typeExpression === this._typeExpression ? this : new JSVariableDeclarations_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, typeExpression, this._varargs, this._variables);
|
|
1804
|
+
}
|
|
1805
|
+
get varargs() {
|
|
1806
|
+
return this._varargs;
|
|
1807
|
+
}
|
|
1808
|
+
withVarargs(varargs) {
|
|
1809
|
+
return varargs === this._varargs ? this : new JSVariableDeclarations_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeExpression, varargs, this._variables);
|
|
1810
|
+
}
|
|
1811
|
+
get variables() {
|
|
1812
|
+
return tree_1.JRightPadded.getElements(this._variables);
|
|
1813
|
+
}
|
|
1814
|
+
withVariables(variables) {
|
|
1815
|
+
return this.padding.withVariables(tree_1.JRightPadded.withElements(this._variables, variables));
|
|
1816
|
+
}
|
|
1817
|
+
acceptJavaScript(v, p) {
|
|
1818
|
+
return v.visitJSVariableDeclarations(this, p);
|
|
1819
|
+
}
|
|
1820
|
+
get type() {
|
|
1821
|
+
return extensions.getJavaType(this);
|
|
1822
|
+
}
|
|
1823
|
+
withType(type) {
|
|
1824
|
+
return extensions.withJavaType(this, type);
|
|
1825
|
+
}
|
|
1826
|
+
get padding() {
|
|
1827
|
+
const t = this;
|
|
1828
|
+
return new class {
|
|
1829
|
+
get variables() {
|
|
1830
|
+
return t._variables;
|
|
1831
|
+
}
|
|
1832
|
+
withVariables(variables) {
|
|
1833
|
+
return t._variables === variables ? t : new JSVariableDeclarations_1(t._id, t._prefix, t._markers, t._leadingAnnotations, t._modifiers, t._typeExpression, t._varargs, variables);
|
|
1834
|
+
}
|
|
1835
|
+
};
|
|
1836
|
+
}
|
|
1837
|
+
};
|
|
1838
|
+
exports.JSVariableDeclarations = JSVariableDeclarations;
|
|
1839
|
+
exports.JSVariableDeclarations = JSVariableDeclarations = JSVariableDeclarations_1 = __decorate([
|
|
1840
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JSVariableDeclarations")
|
|
1841
|
+
], JSVariableDeclarations);
|
|
1842
|
+
(function (JSVariableDeclarations) {
|
|
1843
|
+
let JSNamedVariable = class JSNamedVariable extends (0, support_types_1.JSMixin)(Object) {
|
|
1844
|
+
constructor(id, prefix, markers, name, dimensionsAfterName, initializer, variableType) {
|
|
1845
|
+
super();
|
|
1846
|
+
this._id = id;
|
|
1847
|
+
this._prefix = prefix;
|
|
1848
|
+
this._markers = markers;
|
|
1849
|
+
this._name = name;
|
|
1850
|
+
this._dimensionsAfterName = dimensionsAfterName;
|
|
1851
|
+
this._initializer = initializer;
|
|
1852
|
+
this._variableType = variableType;
|
|
1853
|
+
}
|
|
1854
|
+
get id() {
|
|
1855
|
+
return this._id;
|
|
1856
|
+
}
|
|
1857
|
+
withId(id) {
|
|
1858
|
+
return id === this._id ? this : new JSVariableDeclarations.JSNamedVariable(id, this._prefix, this._markers, this._name, this._dimensionsAfterName, this._initializer, this._variableType);
|
|
1859
|
+
}
|
|
1860
|
+
get prefix() {
|
|
1861
|
+
return this._prefix;
|
|
1862
|
+
}
|
|
1863
|
+
withPrefix(prefix) {
|
|
1864
|
+
return prefix === this._prefix ? this : new JSVariableDeclarations.JSNamedVariable(this._id, prefix, this._markers, this._name, this._dimensionsAfterName, this._initializer, this._variableType);
|
|
1865
|
+
}
|
|
1866
|
+
get markers() {
|
|
1867
|
+
return this._markers;
|
|
1868
|
+
}
|
|
1869
|
+
withMarkers(markers) {
|
|
1870
|
+
return markers === this._markers ? this : new JSVariableDeclarations.JSNamedVariable(this._id, this._prefix, markers, this._name, this._dimensionsAfterName, this._initializer, this._variableType);
|
|
1871
|
+
}
|
|
1872
|
+
get name() {
|
|
1873
|
+
return this._name;
|
|
1874
|
+
}
|
|
1875
|
+
withName(name) {
|
|
1876
|
+
return name === this._name ? this : new JSVariableDeclarations.JSNamedVariable(this._id, this._prefix, this._markers, name, this._dimensionsAfterName, this._initializer, this._variableType);
|
|
1877
|
+
}
|
|
1878
|
+
get dimensionsAfterName() {
|
|
1879
|
+
return tree_1.JLeftPadded.getElements(this._dimensionsAfterName);
|
|
1880
|
+
}
|
|
1881
|
+
withDimensionsAfterName(dimensionsAfterName) {
|
|
1882
|
+
return this.padding.withDimensionsAfterName(tree_1.JLeftPadded.withElements(this._dimensionsAfterName, dimensionsAfterName));
|
|
1883
|
+
}
|
|
1884
|
+
get initializer() {
|
|
1885
|
+
return this._initializer === null ? null : this._initializer.element;
|
|
1886
|
+
}
|
|
1887
|
+
withInitializer(initializer) {
|
|
1888
|
+
return this.padding.withInitializer(tree_1.JLeftPadded.withElement(this._initializer, initializer));
|
|
1889
|
+
}
|
|
1890
|
+
get variableType() {
|
|
1891
|
+
return this._variableType;
|
|
1892
|
+
}
|
|
1893
|
+
withVariableType(variableType) {
|
|
1894
|
+
return variableType === this._variableType ? this : new JSVariableDeclarations.JSNamedVariable(this._id, this._prefix, this._markers, this._name, this._dimensionsAfterName, this._initializer, variableType);
|
|
1895
|
+
}
|
|
1896
|
+
acceptJavaScript(v, p) {
|
|
1897
|
+
return v.visitJSVariableDeclarationsJSNamedVariable(this, p);
|
|
1898
|
+
}
|
|
1899
|
+
get type() {
|
|
1900
|
+
return extensions.getJavaType(this);
|
|
1901
|
+
}
|
|
1902
|
+
withType(type) {
|
|
1903
|
+
return extensions.withJavaType(this, type);
|
|
1904
|
+
}
|
|
1905
|
+
get padding() {
|
|
1906
|
+
const t = this;
|
|
1907
|
+
return new class {
|
|
1908
|
+
get dimensionsAfterName() {
|
|
1909
|
+
return t._dimensionsAfterName;
|
|
1910
|
+
}
|
|
1911
|
+
withDimensionsAfterName(dimensionsAfterName) {
|
|
1912
|
+
return t._dimensionsAfterName === dimensionsAfterName ? t : new JSVariableDeclarations.JSNamedVariable(t._id, t._prefix, t._markers, t._name, dimensionsAfterName, t._initializer, t._variableType);
|
|
1913
|
+
}
|
|
1914
|
+
get initializer() {
|
|
1915
|
+
return t._initializer;
|
|
1916
|
+
}
|
|
1917
|
+
withInitializer(initializer) {
|
|
1918
|
+
return t._initializer === initializer ? t : new JSVariableDeclarations.JSNamedVariable(t._id, t._prefix, t._markers, t._name, t._dimensionsAfterName, initializer, t._variableType);
|
|
1919
|
+
}
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
};
|
|
1923
|
+
JSNamedVariable = __decorate([
|
|
1924
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JSVariableDeclarations$JSNamedVariable")
|
|
1925
|
+
], JSNamedVariable);
|
|
1926
|
+
JSVariableDeclarations.JSNamedVariable = JSNamedVariable;
|
|
1927
|
+
})(JSVariableDeclarations || (exports.JSVariableDeclarations = JSVariableDeclarations = {}));
|
|
1928
|
+
let JSMethodDeclaration = JSMethodDeclaration_1 = class JSMethodDeclaration extends (0, support_types_1.JSMixin)(Object) {
|
|
1929
|
+
constructor(id, prefix, markers, leadingAnnotations, modifiers, typeParameters, returnTypeExpression, name, parameters, throwz, body, defaultValue, methodType) {
|
|
1930
|
+
super();
|
|
1931
|
+
this._id = id;
|
|
1932
|
+
this._prefix = prefix;
|
|
1933
|
+
this._markers = markers;
|
|
1934
|
+
this._leadingAnnotations = leadingAnnotations;
|
|
1935
|
+
this._modifiers = modifiers;
|
|
1936
|
+
this._typeParameters = typeParameters;
|
|
1937
|
+
this._returnTypeExpression = returnTypeExpression;
|
|
1938
|
+
this._name = name;
|
|
1939
|
+
this._parameters = parameters;
|
|
1940
|
+
this._throwz = throwz;
|
|
1941
|
+
this._body = body;
|
|
1942
|
+
this._defaultValue = defaultValue;
|
|
1943
|
+
this._methodType = methodType;
|
|
1944
|
+
}
|
|
1945
|
+
get id() {
|
|
1946
|
+
return this._id;
|
|
1947
|
+
}
|
|
1948
|
+
withId(id) {
|
|
1949
|
+
return id === this._id ? this : new JSMethodDeclaration_1(id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._returnTypeExpression, this._name, this._parameters, this._throwz, this._body, this._defaultValue, this._methodType);
|
|
1950
|
+
}
|
|
1951
|
+
get prefix() {
|
|
1952
|
+
return this._prefix;
|
|
1953
|
+
}
|
|
1954
|
+
withPrefix(prefix) {
|
|
1955
|
+
return prefix === this._prefix ? this : new JSMethodDeclaration_1(this._id, prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._returnTypeExpression, this._name, this._parameters, this._throwz, this._body, this._defaultValue, this._methodType);
|
|
1956
|
+
}
|
|
1957
|
+
get markers() {
|
|
1958
|
+
return this._markers;
|
|
1959
|
+
}
|
|
1960
|
+
withMarkers(markers) {
|
|
1961
|
+
return markers === this._markers ? this : new JSMethodDeclaration_1(this._id, this._prefix, markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._returnTypeExpression, this._name, this._parameters, this._throwz, this._body, this._defaultValue, this._methodType);
|
|
1962
|
+
}
|
|
1963
|
+
get leadingAnnotations() {
|
|
1964
|
+
return this._leadingAnnotations;
|
|
1965
|
+
}
|
|
1966
|
+
withLeadingAnnotations(leadingAnnotations) {
|
|
1967
|
+
return leadingAnnotations === this._leadingAnnotations ? this : new JSMethodDeclaration_1(this._id, this._prefix, this._markers, leadingAnnotations, this._modifiers, this._typeParameters, this._returnTypeExpression, this._name, this._parameters, this._throwz, this._body, this._defaultValue, this._methodType);
|
|
1968
|
+
}
|
|
1969
|
+
get modifiers() {
|
|
1970
|
+
return this._modifiers;
|
|
1971
|
+
}
|
|
1972
|
+
withModifiers(modifiers) {
|
|
1973
|
+
return modifiers === this._modifiers ? this : new JSMethodDeclaration_1(this._id, this._prefix, this._markers, this._leadingAnnotations, modifiers, this._typeParameters, this._returnTypeExpression, this._name, this._parameters, this._throwz, this._body, this._defaultValue, this._methodType);
|
|
1974
|
+
}
|
|
1975
|
+
get typeParameters() {
|
|
1976
|
+
return this._typeParameters;
|
|
1977
|
+
}
|
|
1978
|
+
withTypeParameters(typeParameters) {
|
|
1979
|
+
return typeParameters === this._typeParameters ? this : new JSMethodDeclaration_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, typeParameters, this._returnTypeExpression, this._name, this._parameters, this._throwz, this._body, this._defaultValue, this._methodType);
|
|
1980
|
+
}
|
|
1981
|
+
get returnTypeExpression() {
|
|
1982
|
+
return this._returnTypeExpression;
|
|
1983
|
+
}
|
|
1984
|
+
withReturnTypeExpression(returnTypeExpression) {
|
|
1985
|
+
return returnTypeExpression === this._returnTypeExpression ? this : new JSMethodDeclaration_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, returnTypeExpression, this._name, this._parameters, this._throwz, this._body, this._defaultValue, this._methodType);
|
|
1986
|
+
}
|
|
1987
|
+
get name() {
|
|
1988
|
+
return this._name;
|
|
1989
|
+
}
|
|
1990
|
+
withName(name) {
|
|
1991
|
+
return name === this._name ? this : new JSMethodDeclaration_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._returnTypeExpression, name, this._parameters, this._throwz, this._body, this._defaultValue, this._methodType);
|
|
1992
|
+
}
|
|
1993
|
+
get parameters() {
|
|
1994
|
+
return this._parameters.elements;
|
|
1995
|
+
}
|
|
1996
|
+
withParameters(parameters) {
|
|
1997
|
+
return this.padding.withParameters(tree_1.JContainer.withElements(this._parameters, parameters));
|
|
1998
|
+
}
|
|
1999
|
+
get throwz() {
|
|
2000
|
+
return this._throwz === null ? null : this._throwz.elements;
|
|
2001
|
+
}
|
|
2002
|
+
withThrowz(throwz) {
|
|
2003
|
+
return this.padding.withThrowz(tree_1.JContainer.withElementsNullable(this._throwz, throwz));
|
|
2004
|
+
}
|
|
2005
|
+
get body() {
|
|
2006
|
+
return this._body;
|
|
2007
|
+
}
|
|
2008
|
+
withBody(body) {
|
|
2009
|
+
return body === this._body ? this : new JSMethodDeclaration_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._returnTypeExpression, this._name, this._parameters, this._throwz, body, this._defaultValue, this._methodType);
|
|
2010
|
+
}
|
|
2011
|
+
get defaultValue() {
|
|
2012
|
+
return this._defaultValue === null ? null : this._defaultValue.element;
|
|
2013
|
+
}
|
|
2014
|
+
withDefaultValue(defaultValue) {
|
|
2015
|
+
return this.padding.withDefaultValue(tree_1.JLeftPadded.withElement(this._defaultValue, defaultValue));
|
|
2016
|
+
}
|
|
2017
|
+
get methodType() {
|
|
2018
|
+
return this._methodType;
|
|
2019
|
+
}
|
|
2020
|
+
withMethodType(methodType) {
|
|
2021
|
+
return methodType === this._methodType ? this : new JSMethodDeclaration_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._returnTypeExpression, this._name, this._parameters, this._throwz, this._body, this._defaultValue, methodType);
|
|
2022
|
+
}
|
|
2023
|
+
acceptJavaScript(v, p) {
|
|
2024
|
+
return v.visitJSMethodDeclaration(this, p);
|
|
2025
|
+
}
|
|
2026
|
+
get type() {
|
|
2027
|
+
return extensions.getJavaType(this);
|
|
2028
|
+
}
|
|
2029
|
+
withType(type) {
|
|
2030
|
+
return extensions.withJavaType(this, type);
|
|
2031
|
+
}
|
|
2032
|
+
get padding() {
|
|
2033
|
+
const t = this;
|
|
2034
|
+
return new class {
|
|
2035
|
+
get parameters() {
|
|
2036
|
+
return t._parameters;
|
|
2037
|
+
}
|
|
2038
|
+
withParameters(parameters) {
|
|
2039
|
+
return t._parameters === parameters ? t : new JSMethodDeclaration_1(t._id, t._prefix, t._markers, t._leadingAnnotations, t._modifiers, t._typeParameters, t._returnTypeExpression, t._name, parameters, t._throwz, t._body, t._defaultValue, t._methodType);
|
|
2040
|
+
}
|
|
2041
|
+
get throwz() {
|
|
2042
|
+
return t._throwz;
|
|
2043
|
+
}
|
|
2044
|
+
withThrowz(throwz) {
|
|
2045
|
+
return t._throwz === throwz ? t : new JSMethodDeclaration_1(t._id, t._prefix, t._markers, t._leadingAnnotations, t._modifiers, t._typeParameters, t._returnTypeExpression, t._name, t._parameters, throwz, t._body, t._defaultValue, t._methodType);
|
|
2046
|
+
}
|
|
2047
|
+
get defaultValue() {
|
|
2048
|
+
return t._defaultValue;
|
|
2049
|
+
}
|
|
2050
|
+
withDefaultValue(defaultValue) {
|
|
2051
|
+
return t._defaultValue === defaultValue ? t : new JSMethodDeclaration_1(t._id, t._prefix, t._markers, t._leadingAnnotations, t._modifiers, t._typeParameters, t._returnTypeExpression, t._name, t._parameters, t._throwz, t._body, defaultValue, t._methodType);
|
|
2052
|
+
}
|
|
2053
|
+
};
|
|
2054
|
+
}
|
|
2055
|
+
};
|
|
2056
|
+
exports.JSMethodDeclaration = JSMethodDeclaration;
|
|
2057
|
+
exports.JSMethodDeclaration = JSMethodDeclaration = JSMethodDeclaration_1 = __decorate([
|
|
2058
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$JSMethodDeclaration")
|
|
2059
|
+
], JSMethodDeclaration);
|
|
2060
|
+
let NamespaceDeclaration = NamespaceDeclaration_1 = class NamespaceDeclaration extends (0, support_types_1.JSMixin)(Object) {
|
|
2061
|
+
constructor(id, prefix, markers, modifiers, namespace, name, body) {
|
|
2062
|
+
super();
|
|
2063
|
+
this._id = id;
|
|
2064
|
+
this._prefix = prefix;
|
|
2065
|
+
this._markers = markers;
|
|
2066
|
+
this._modifiers = modifiers;
|
|
2067
|
+
this._namespace = namespace;
|
|
2068
|
+
this._name = name;
|
|
2069
|
+
this._body = body;
|
|
2070
|
+
}
|
|
2071
|
+
get id() {
|
|
2072
|
+
return this._id;
|
|
2073
|
+
}
|
|
2074
|
+
withId(id) {
|
|
2075
|
+
return id === this._id ? this : new NamespaceDeclaration_1(id, this._prefix, this._markers, this._modifiers, this._namespace, this._name, this._body);
|
|
2076
|
+
}
|
|
2077
|
+
get prefix() {
|
|
2078
|
+
return this._prefix;
|
|
2079
|
+
}
|
|
2080
|
+
withPrefix(prefix) {
|
|
2081
|
+
return prefix === this._prefix ? this : new NamespaceDeclaration_1(this._id, prefix, this._markers, this._modifiers, this._namespace, this._name, this._body);
|
|
2082
|
+
}
|
|
2083
|
+
get markers() {
|
|
2084
|
+
return this._markers;
|
|
2085
|
+
}
|
|
2086
|
+
withMarkers(markers) {
|
|
2087
|
+
return markers === this._markers ? this : new NamespaceDeclaration_1(this._id, this._prefix, markers, this._modifiers, this._namespace, this._name, this._body);
|
|
2088
|
+
}
|
|
2089
|
+
get modifiers() {
|
|
2090
|
+
return this._modifiers;
|
|
2091
|
+
}
|
|
2092
|
+
withModifiers(modifiers) {
|
|
2093
|
+
return modifiers === this._modifiers ? this : new NamespaceDeclaration_1(this._id, this._prefix, this._markers, modifiers, this._namespace, this._name, this._body);
|
|
2094
|
+
}
|
|
2095
|
+
get namespace() {
|
|
2096
|
+
return this._namespace;
|
|
2097
|
+
}
|
|
2098
|
+
withNamespace(namespace) {
|
|
2099
|
+
return namespace === this._namespace ? this : new NamespaceDeclaration_1(this._id, this._prefix, this._markers, this._modifiers, namespace, this._name, this._body);
|
|
2100
|
+
}
|
|
2101
|
+
get name() {
|
|
2102
|
+
return this._name.element;
|
|
2103
|
+
}
|
|
2104
|
+
withName(name) {
|
|
2105
|
+
return this.padding.withName(this._name.withElement(name));
|
|
2106
|
+
}
|
|
2107
|
+
get body() {
|
|
2108
|
+
return this._body;
|
|
2109
|
+
}
|
|
2110
|
+
withBody(body) {
|
|
2111
|
+
return body === this._body ? this : new NamespaceDeclaration_1(this._id, this._prefix, this._markers, this._modifiers, this._namespace, this._name, body);
|
|
2112
|
+
}
|
|
2113
|
+
acceptJavaScript(v, p) {
|
|
2114
|
+
return v.visitNamespaceDeclaration(this, p);
|
|
2115
|
+
}
|
|
2116
|
+
get padding() {
|
|
2117
|
+
const t = this;
|
|
2118
|
+
return new class {
|
|
2119
|
+
get name() {
|
|
2120
|
+
return t._name;
|
|
2121
|
+
}
|
|
2122
|
+
withName(name) {
|
|
2123
|
+
return t._name === name ? t : new NamespaceDeclaration_1(t._id, t._prefix, t._markers, t._modifiers, t._namespace, name, t._body);
|
|
2124
|
+
}
|
|
2125
|
+
};
|
|
2126
|
+
}
|
|
2127
|
+
};
|
|
2128
|
+
exports.NamespaceDeclaration = NamespaceDeclaration;
|
|
2129
|
+
exports.NamespaceDeclaration = NamespaceDeclaration = NamespaceDeclaration_1 = __decorate([
|
|
2130
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$NamespaceDeclaration")
|
|
2131
|
+
], NamespaceDeclaration);
|
|
1756
2132
|
//# sourceMappingURL=tree.js.map
|