@openrewrite/rewrite 0.24.0 → 0.25.1
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/LICENSE.md +87 -0
- package/dist/src/core/parser.js +17 -7
- package/dist/src/core/parser.js.map +1 -1
- package/dist/src/core/tree.d.ts +1 -1
- package/dist/src/core/tree.d.ts.map +1 -1
- package/dist/src/java/markers.d.ts +2 -2
- package/dist/src/java/markers.d.ts.map +1 -1
- package/dist/src/java/remote/receiver.js +17 -7
- package/dist/src/java/remote/receiver.js.map +1 -1
- package/dist/src/java/remote/sender.js +17 -7
- package/dist/src/java/remote/sender.js.map +1 -1
- package/dist/src/java/tree/support_types.d.ts +1 -1
- package/dist/src/java/tree/support_types.d.ts.map +1 -1
- package/dist/src/java/tree/tree.d.ts +70 -70
- package/dist/src/java/tree/tree.d.ts.map +1 -1
- package/dist/src/java/tree/tree.js +17 -7
- package/dist/src/java/tree/tree.js.map +1 -1
- package/dist/src/java/visitor.js +17 -7
- package/dist/src/java/visitor.js.map +1 -1
- package/dist/src/javascript/extensions.js +17 -7
- package/dist/src/javascript/extensions.js.map +1 -1
- package/dist/src/javascript/parser.d.ts +5 -3
- package/dist/src/javascript/parser.d.ts.map +1 -1
- package/dist/src/javascript/parser.js +67 -21
- package/dist/src/javascript/parser.js.map +1 -1
- package/dist/src/javascript/parserUtils.d.ts +1 -1
- package/dist/src/javascript/parserUtils.js +17 -7
- package/dist/src/javascript/parserUtils.js.map +1 -1
- package/dist/src/javascript/projectParser.js +17 -7
- package/dist/src/javascript/projectParser.js.map +1 -1
- package/dist/src/javascript/remote/receiver.d.ts.map +1 -1
- package/dist/src/javascript/remote/receiver.js +71 -14
- package/dist/src/javascript/remote/receiver.js.map +1 -1
- package/dist/src/javascript/remote/remote_extensions.js +17 -7
- package/dist/src/javascript/remote/remote_extensions.js.map +1 -1
- package/dist/src/javascript/remote/sender.d.ts.map +1 -1
- package/dist/src/javascript/remote/sender.js +56 -11
- package/dist/src/javascript/remote/sender.js.map +1 -1
- package/dist/src/javascript/tree/extensions.js +17 -7
- package/dist/src/javascript/tree/extensions.js.map +1 -1
- package/dist/src/javascript/tree/support_types.d.ts +21 -7
- package/dist/src/javascript/tree/support_types.d.ts.map +1 -1
- package/dist/src/javascript/tree/support_types.js +31 -7
- package/dist/src/javascript/tree/support_types.js.map +1 -1
- package/dist/src/javascript/tree/tree.d.ts +288 -77
- package/dist/src/javascript/tree/tree.d.ts.map +1 -1
- package/dist/src/javascript/tree/tree.js +348 -44
- package/dist/src/javascript/tree/tree.js.map +1 -1
- package/dist/src/javascript/typeMapping.js +17 -7
- package/dist/src/javascript/typeMapping.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 +71 -10
- package/dist/src/javascript/visitor.js.map +1 -1
- package/dist/src/json/tree.d.ts +1 -1
- package/dist/src/json/tree.d.ts.map +1 -1
- package/dist/src/json/visitor.js +17 -7
- package/dist/src/json/visitor.js.map +1 -1
- package/dist/src/yaml/tree/support_types.d.ts +1 -1
- package/dist/src/yaml/tree/support_types.d.ts.map +1 -1
- package/dist/src/yaml/tree/tree.d.ts +11 -11
- package/package.json +1 -1
- package/LICENSE +0 -201
|
@@ -21,17 +21,27 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
21
21
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
22
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
23
|
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || function (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var CompilationUnit_1, Alias_1, ArrowFunction_1, Await_1, ConditionalType_1, DefaultType_1, Delete_1, Export_1, ExpressionWithTypeArguments_1, FunctionType_1, InferType_1, ImportType_1, JsImport_1, JsImportSpecifier_1, JsBinary_1, LiteralType_1, MappedType_1, ObjectBindingDeclarations_1, PropertyAssignment_1, SatisfiesExpression_1, ScopedVariableDeclarations_1, TaggedTemplateExpression_1, TemplateExpression_1, Tuple_1, TypeDeclaration_1, TypeOf_1, TypeQuery_1, TypeOperator_1, TypePredicate_1, Unary_1, Union_1, Intersection_1, Void_1, Yield_1, TypeInfo_1, JSVariableDeclarations_1, JSMethodDeclaration_1, JSForOfLoop_1, JSForInLoop_1, JSForInOfLoopControl_1, NamespaceDeclaration_1, FunctionDeclaration_1, TypeLiteral_1, IndexSignatureDeclaration_1, ArrayBindingPattern_1, BindingElement_1, ExportDeclaration_1, ExportAssignment_1, NamedExports_1, ExportSpecifier_1, IndexedAccessType_1, JsAssignmentOperation_1, TypeTreeExpression_1;
|
|
32
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.
|
|
34
|
-
exports.JsAssignmentOperation = void 0;
|
|
43
|
+
exports.ExportSpecifier = exports.NamedExports = exports.ExportAssignment = exports.ExportDeclaration = exports.BindingElement = exports.ArrayBindingPattern = exports.IndexSignatureDeclaration = exports.TypeLiteral = exports.FunctionDeclaration = exports.NamespaceDeclaration = exports.JSForInOfLoopControl = exports.JSForInLoop = exports.JSForOfLoop = exports.JSMethodDeclaration = exports.JSVariableDeclarations = exports.TypeInfo = exports.Yield = exports.Void = exports.Intersection = exports.Union = exports.Unary = exports.TypePredicate = exports.TypeOperator = exports.TypeQuery = exports.TypeOf = exports.TypeDeclaration = exports.Tuple = exports.TemplateExpression = exports.TaggedTemplateExpression = exports.ScopedVariableDeclarations = exports.SatisfiesExpression = exports.PropertyAssignment = exports.ObjectBindingDeclarations = exports.MappedType = exports.LiteralType = exports.JsBinary = exports.JsImportSpecifier = exports.JsImport = exports.ImportType = exports.InferType = exports.FunctionType = exports.ExpressionWithTypeArguments = exports.Export = exports.Delete = exports.DefaultType = exports.ConditionalType = exports.Await = exports.ArrowFunction = exports.Alias = exports.CompilationUnit = void 0;
|
|
44
|
+
exports.TypeTreeExpression = exports.JsAssignmentOperation = exports.IndexedAccessType = void 0;
|
|
35
45
|
const extensions = __importStar(require("./extensions"));
|
|
36
46
|
const support_types_1 = require("./support_types");
|
|
37
47
|
const core_1 = require("../../core");
|
|
@@ -210,7 +220,7 @@ exports.Alias = Alias = Alias_1 = __decorate([
|
|
|
210
220
|
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$Alias")
|
|
211
221
|
], Alias);
|
|
212
222
|
let ArrowFunction = ArrowFunction_1 = class ArrowFunction extends (0, support_types_1.JSMixin)(Object) {
|
|
213
|
-
constructor(id, prefix, markers, leadingAnnotations, modifiers, typeParameters, parameters, returnTypeExpression,
|
|
223
|
+
constructor(id, prefix, markers, leadingAnnotations, modifiers, typeParameters, parameters, returnTypeExpression, body, _type) {
|
|
214
224
|
super();
|
|
215
225
|
this._id = id;
|
|
216
226
|
this._prefix = prefix;
|
|
@@ -220,7 +230,6 @@ let ArrowFunction = ArrowFunction_1 = class ArrowFunction extends (0, support_ty
|
|
|
220
230
|
this._typeParameters = typeParameters;
|
|
221
231
|
this._parameters = parameters;
|
|
222
232
|
this._returnTypeExpression = returnTypeExpression;
|
|
223
|
-
this._arrow = arrow;
|
|
224
233
|
this._body = body;
|
|
225
234
|
this._type = _type;
|
|
226
235
|
}
|
|
@@ -228,71 +237,76 @@ let ArrowFunction = ArrowFunction_1 = class ArrowFunction extends (0, support_ty
|
|
|
228
237
|
return this._id;
|
|
229
238
|
}
|
|
230
239
|
withId(id) {
|
|
231
|
-
return id === this._id ? this : new ArrowFunction_1(id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this.
|
|
240
|
+
return id === this._id ? this : new ArrowFunction_1(id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
|
|
232
241
|
}
|
|
233
242
|
get prefix() {
|
|
234
243
|
return this._prefix;
|
|
235
244
|
}
|
|
236
245
|
withPrefix(prefix) {
|
|
237
|
-
return prefix === this._prefix ? this : new ArrowFunction_1(this._id, prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this.
|
|
246
|
+
return prefix === this._prefix ? this : new ArrowFunction_1(this._id, prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
|
|
238
247
|
}
|
|
239
248
|
get markers() {
|
|
240
249
|
return this._markers;
|
|
241
250
|
}
|
|
242
251
|
withMarkers(markers) {
|
|
243
|
-
return markers === this._markers ? this : new ArrowFunction_1(this._id, this._prefix, markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this.
|
|
252
|
+
return markers === this._markers ? this : new ArrowFunction_1(this._id, this._prefix, markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
|
|
244
253
|
}
|
|
245
254
|
get leadingAnnotations() {
|
|
246
255
|
return this._leadingAnnotations;
|
|
247
256
|
}
|
|
248
257
|
withLeadingAnnotations(leadingAnnotations) {
|
|
249
|
-
return leadingAnnotations === this._leadingAnnotations ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this.
|
|
258
|
+
return leadingAnnotations === this._leadingAnnotations ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
|
|
250
259
|
}
|
|
251
260
|
get modifiers() {
|
|
252
261
|
return this._modifiers;
|
|
253
262
|
}
|
|
254
263
|
withModifiers(modifiers) {
|
|
255
|
-
return modifiers === this._modifiers ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this.
|
|
264
|
+
return modifiers === this._modifiers ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, modifiers, this._typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
|
|
256
265
|
}
|
|
257
266
|
get typeParameters() {
|
|
258
267
|
return this._typeParameters;
|
|
259
268
|
}
|
|
260
269
|
withTypeParameters(typeParameters) {
|
|
261
|
-
return typeParameters === this._typeParameters ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, typeParameters, this._parameters, this._returnTypeExpression, this.
|
|
270
|
+
return typeParameters === this._typeParameters ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, typeParameters, this._parameters, this._returnTypeExpression, this._body, this._type);
|
|
262
271
|
}
|
|
263
272
|
get parameters() {
|
|
264
273
|
return this._parameters;
|
|
265
274
|
}
|
|
266
275
|
withParameters(parameters) {
|
|
267
|
-
return parameters === this._parameters ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, parameters, this._returnTypeExpression, this.
|
|
276
|
+
return parameters === this._parameters ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, parameters, this._returnTypeExpression, this._body, this._type);
|
|
268
277
|
}
|
|
269
278
|
get returnTypeExpression() {
|
|
270
279
|
return this._returnTypeExpression;
|
|
271
280
|
}
|
|
272
281
|
withReturnTypeExpression(returnTypeExpression) {
|
|
273
|
-
return returnTypeExpression === this._returnTypeExpression ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, returnTypeExpression, this.
|
|
274
|
-
}
|
|
275
|
-
get arrow() {
|
|
276
|
-
return this._arrow;
|
|
277
|
-
}
|
|
278
|
-
withArrow(arrow) {
|
|
279
|
-
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);
|
|
282
|
+
return returnTypeExpression === this._returnTypeExpression ? this : new ArrowFunction_1(this._id, this._prefix, this._markers, this._leadingAnnotations, this._modifiers, this._typeParameters, this._parameters, returnTypeExpression, this._body, this._type);
|
|
280
283
|
}
|
|
281
284
|
get body() {
|
|
282
|
-
return this._body;
|
|
285
|
+
return this._body.element;
|
|
283
286
|
}
|
|
284
287
|
withBody(body) {
|
|
285
|
-
return
|
|
288
|
+
return this.padding.withBody(this._body.withElement(body));
|
|
286
289
|
}
|
|
287
290
|
get type() {
|
|
288
291
|
return this._type;
|
|
289
292
|
}
|
|
290
293
|
withType(_type) {
|
|
291
|
-
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.
|
|
294
|
+
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._body, _type);
|
|
292
295
|
}
|
|
293
296
|
acceptJavaScript(v, p) {
|
|
294
297
|
return v.visitArrowFunction(this, p);
|
|
295
298
|
}
|
|
299
|
+
get padding() {
|
|
300
|
+
const t = this;
|
|
301
|
+
return new class {
|
|
302
|
+
get body() {
|
|
303
|
+
return t._body;
|
|
304
|
+
}
|
|
305
|
+
withBody(body) {
|
|
306
|
+
return t._body === body ? t : new ArrowFunction_1(t._id, t._prefix, t._markers, t._leadingAnnotations, t._modifiers, t._typeParameters, t._parameters, t._returnTypeExpression, body, t._type);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
296
310
|
};
|
|
297
311
|
exports.ArrowFunction = ArrowFunction;
|
|
298
312
|
exports.ArrowFunction = ArrowFunction = ArrowFunction_1 = __decorate([
|
|
@@ -1201,6 +1215,247 @@ exports.LiteralType = LiteralType;
|
|
|
1201
1215
|
exports.LiteralType = LiteralType = LiteralType_1 = __decorate([
|
|
1202
1216
|
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$LiteralType")
|
|
1203
1217
|
], LiteralType);
|
|
1218
|
+
let MappedType = MappedType_1 = class MappedType extends (0, support_types_1.JSMixin)(Object) {
|
|
1219
|
+
constructor(id, prefix, markers, prefixToken, hasReadonly, keysRemapping, suffixToken, hasQuestionToken, valueType, _type) {
|
|
1220
|
+
super();
|
|
1221
|
+
this._id = id;
|
|
1222
|
+
this._prefix = prefix;
|
|
1223
|
+
this._markers = markers;
|
|
1224
|
+
this._prefixToken = prefixToken;
|
|
1225
|
+
this._hasReadonly = hasReadonly;
|
|
1226
|
+
this._keysRemapping = keysRemapping;
|
|
1227
|
+
this._suffixToken = suffixToken;
|
|
1228
|
+
this._hasQuestionToken = hasQuestionToken;
|
|
1229
|
+
this._valueType = valueType;
|
|
1230
|
+
this._type = _type;
|
|
1231
|
+
}
|
|
1232
|
+
get id() {
|
|
1233
|
+
return this._id;
|
|
1234
|
+
}
|
|
1235
|
+
withId(id) {
|
|
1236
|
+
return id === this._id ? this : new MappedType_1(id, this._prefix, this._markers, this._prefixToken, this._hasReadonly, this._keysRemapping, this._suffixToken, this._hasQuestionToken, this._valueType, this._type);
|
|
1237
|
+
}
|
|
1238
|
+
get prefix() {
|
|
1239
|
+
return this._prefix;
|
|
1240
|
+
}
|
|
1241
|
+
withPrefix(prefix) {
|
|
1242
|
+
return prefix === this._prefix ? this : new MappedType_1(this._id, prefix, this._markers, this._prefixToken, this._hasReadonly, this._keysRemapping, this._suffixToken, this._hasQuestionToken, this._valueType, this._type);
|
|
1243
|
+
}
|
|
1244
|
+
get markers() {
|
|
1245
|
+
return this._markers;
|
|
1246
|
+
}
|
|
1247
|
+
withMarkers(markers) {
|
|
1248
|
+
return markers === this._markers ? this : new MappedType_1(this._id, this._prefix, markers, this._prefixToken, this._hasReadonly, this._keysRemapping, this._suffixToken, this._hasQuestionToken, this._valueType, this._type);
|
|
1249
|
+
}
|
|
1250
|
+
get prefixToken() {
|
|
1251
|
+
return this._prefixToken === null ? null : this._prefixToken.element;
|
|
1252
|
+
}
|
|
1253
|
+
withPrefixToken(prefixToken) {
|
|
1254
|
+
return this.padding.withPrefixToken(tree_1.JLeftPadded.withElement(this._prefixToken, prefixToken));
|
|
1255
|
+
}
|
|
1256
|
+
get hasReadonly() {
|
|
1257
|
+
return this._hasReadonly.element;
|
|
1258
|
+
}
|
|
1259
|
+
withHasReadonly(hasReadonly) {
|
|
1260
|
+
return this.padding.withHasReadonly(this._hasReadonly.withElement(hasReadonly));
|
|
1261
|
+
}
|
|
1262
|
+
get keysRemapping() {
|
|
1263
|
+
return this._keysRemapping;
|
|
1264
|
+
}
|
|
1265
|
+
withKeysRemapping(keysRemapping) {
|
|
1266
|
+
return keysRemapping === this._keysRemapping ? this : new MappedType_1(this._id, this._prefix, this._markers, this._prefixToken, this._hasReadonly, keysRemapping, this._suffixToken, this._hasQuestionToken, this._valueType, this._type);
|
|
1267
|
+
}
|
|
1268
|
+
get suffixToken() {
|
|
1269
|
+
return this._suffixToken === null ? null : this._suffixToken.element;
|
|
1270
|
+
}
|
|
1271
|
+
withSuffixToken(suffixToken) {
|
|
1272
|
+
return this.padding.withSuffixToken(tree_1.JLeftPadded.withElement(this._suffixToken, suffixToken));
|
|
1273
|
+
}
|
|
1274
|
+
get hasQuestionToken() {
|
|
1275
|
+
return this._hasQuestionToken.element;
|
|
1276
|
+
}
|
|
1277
|
+
withHasQuestionToken(hasQuestionToken) {
|
|
1278
|
+
return this.padding.withHasQuestionToken(this._hasQuestionToken.withElement(hasQuestionToken));
|
|
1279
|
+
}
|
|
1280
|
+
get valueType() {
|
|
1281
|
+
return this._valueType.elements;
|
|
1282
|
+
}
|
|
1283
|
+
withValueType(valueType) {
|
|
1284
|
+
return this.padding.withValueType(tree_1.JContainer.withElements(this._valueType, valueType));
|
|
1285
|
+
}
|
|
1286
|
+
get type() {
|
|
1287
|
+
return this._type;
|
|
1288
|
+
}
|
|
1289
|
+
withType(_type) {
|
|
1290
|
+
return _type === this._type ? this : new MappedType_1(this._id, this._prefix, this._markers, this._prefixToken, this._hasReadonly, this._keysRemapping, this._suffixToken, this._hasQuestionToken, this._valueType, _type);
|
|
1291
|
+
}
|
|
1292
|
+
acceptJavaScript(v, p) {
|
|
1293
|
+
return v.visitMappedType(this, p);
|
|
1294
|
+
}
|
|
1295
|
+
get padding() {
|
|
1296
|
+
const t = this;
|
|
1297
|
+
return new class {
|
|
1298
|
+
get prefixToken() {
|
|
1299
|
+
return t._prefixToken;
|
|
1300
|
+
}
|
|
1301
|
+
withPrefixToken(prefixToken) {
|
|
1302
|
+
return t._prefixToken === prefixToken ? t : new MappedType_1(t._id, t._prefix, t._markers, prefixToken, t._hasReadonly, t._keysRemapping, t._suffixToken, t._hasQuestionToken, t._valueType, t._type);
|
|
1303
|
+
}
|
|
1304
|
+
get hasReadonly() {
|
|
1305
|
+
return t._hasReadonly;
|
|
1306
|
+
}
|
|
1307
|
+
withHasReadonly(hasReadonly) {
|
|
1308
|
+
return t._hasReadonly === hasReadonly ? t : new MappedType_1(t._id, t._prefix, t._markers, t._prefixToken, hasReadonly, t._keysRemapping, t._suffixToken, t._hasQuestionToken, t._valueType, t._type);
|
|
1309
|
+
}
|
|
1310
|
+
get suffixToken() {
|
|
1311
|
+
return t._suffixToken;
|
|
1312
|
+
}
|
|
1313
|
+
withSuffixToken(suffixToken) {
|
|
1314
|
+
return t._suffixToken === suffixToken ? t : new MappedType_1(t._id, t._prefix, t._markers, t._prefixToken, t._hasReadonly, t._keysRemapping, suffixToken, t._hasQuestionToken, t._valueType, t._type);
|
|
1315
|
+
}
|
|
1316
|
+
get hasQuestionToken() {
|
|
1317
|
+
return t._hasQuestionToken;
|
|
1318
|
+
}
|
|
1319
|
+
withHasQuestionToken(hasQuestionToken) {
|
|
1320
|
+
return t._hasQuestionToken === hasQuestionToken ? t : new MappedType_1(t._id, t._prefix, t._markers, t._prefixToken, t._hasReadonly, t._keysRemapping, t._suffixToken, hasQuestionToken, t._valueType, t._type);
|
|
1321
|
+
}
|
|
1322
|
+
get valueType() {
|
|
1323
|
+
return t._valueType;
|
|
1324
|
+
}
|
|
1325
|
+
withValueType(valueType) {
|
|
1326
|
+
return t._valueType === valueType ? t : new MappedType_1(t._id, t._prefix, t._markers, t._prefixToken, t._hasReadonly, t._keysRemapping, t._suffixToken, t._hasQuestionToken, valueType, t._type);
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
}
|
|
1330
|
+
};
|
|
1331
|
+
exports.MappedType = MappedType;
|
|
1332
|
+
exports.MappedType = MappedType = MappedType_1 = __decorate([
|
|
1333
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$MappedType")
|
|
1334
|
+
], MappedType);
|
|
1335
|
+
(function (MappedType) {
|
|
1336
|
+
let KeysRemapping = class KeysRemapping extends (0, support_types_1.JSMixin)(Object) {
|
|
1337
|
+
constructor(id, prefix, markers, typeParameter, nameType) {
|
|
1338
|
+
super();
|
|
1339
|
+
this._id = id;
|
|
1340
|
+
this._prefix = prefix;
|
|
1341
|
+
this._markers = markers;
|
|
1342
|
+
this._typeParameter = typeParameter;
|
|
1343
|
+
this._nameType = nameType;
|
|
1344
|
+
}
|
|
1345
|
+
get id() {
|
|
1346
|
+
return this._id;
|
|
1347
|
+
}
|
|
1348
|
+
withId(id) {
|
|
1349
|
+
return id === this._id ? this : new MappedType.KeysRemapping(id, this._prefix, this._markers, this._typeParameter, this._nameType);
|
|
1350
|
+
}
|
|
1351
|
+
get prefix() {
|
|
1352
|
+
return this._prefix;
|
|
1353
|
+
}
|
|
1354
|
+
withPrefix(prefix) {
|
|
1355
|
+
return prefix === this._prefix ? this : new MappedType.KeysRemapping(this._id, prefix, this._markers, this._typeParameter, this._nameType);
|
|
1356
|
+
}
|
|
1357
|
+
get markers() {
|
|
1358
|
+
return this._markers;
|
|
1359
|
+
}
|
|
1360
|
+
withMarkers(markers) {
|
|
1361
|
+
return markers === this._markers ? this : new MappedType.KeysRemapping(this._id, this._prefix, markers, this._typeParameter, this._nameType);
|
|
1362
|
+
}
|
|
1363
|
+
get typeParameter() {
|
|
1364
|
+
return this._typeParameter.element;
|
|
1365
|
+
}
|
|
1366
|
+
withTypeParameter(typeParameter) {
|
|
1367
|
+
return this.padding.withTypeParameter(this._typeParameter.withElement(typeParameter));
|
|
1368
|
+
}
|
|
1369
|
+
get nameType() {
|
|
1370
|
+
return this._nameType === null ? null : this._nameType.element;
|
|
1371
|
+
}
|
|
1372
|
+
withNameType(nameType) {
|
|
1373
|
+
return this.padding.withNameType(tree_1.JRightPadded.withElement(this._nameType, nameType));
|
|
1374
|
+
}
|
|
1375
|
+
acceptJavaScript(v, p) {
|
|
1376
|
+
return v.visitMappedTypeKeysRemapping(this, p);
|
|
1377
|
+
}
|
|
1378
|
+
get padding() {
|
|
1379
|
+
const t = this;
|
|
1380
|
+
return new class {
|
|
1381
|
+
get typeParameter() {
|
|
1382
|
+
return t._typeParameter;
|
|
1383
|
+
}
|
|
1384
|
+
withTypeParameter(typeParameter) {
|
|
1385
|
+
return t._typeParameter === typeParameter ? t : new MappedType.KeysRemapping(t._id, t._prefix, t._markers, typeParameter, t._nameType);
|
|
1386
|
+
}
|
|
1387
|
+
get nameType() {
|
|
1388
|
+
return t._nameType;
|
|
1389
|
+
}
|
|
1390
|
+
withNameType(nameType) {
|
|
1391
|
+
return t._nameType === nameType ? t : new MappedType.KeysRemapping(t._id, t._prefix, t._markers, t._typeParameter, nameType);
|
|
1392
|
+
}
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1395
|
+
};
|
|
1396
|
+
KeysRemapping = __decorate([
|
|
1397
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$MappedType$KeysRemapping")
|
|
1398
|
+
], KeysRemapping);
|
|
1399
|
+
MappedType.KeysRemapping = KeysRemapping;
|
|
1400
|
+
let MappedTypeParameter = class MappedTypeParameter extends (0, support_types_1.JSMixin)(Object) {
|
|
1401
|
+
constructor(id, prefix, markers, name, iterateType) {
|
|
1402
|
+
super();
|
|
1403
|
+
this._id = id;
|
|
1404
|
+
this._prefix = prefix;
|
|
1405
|
+
this._markers = markers;
|
|
1406
|
+
this._name = name;
|
|
1407
|
+
this._iterateType = iterateType;
|
|
1408
|
+
}
|
|
1409
|
+
get id() {
|
|
1410
|
+
return this._id;
|
|
1411
|
+
}
|
|
1412
|
+
withId(id) {
|
|
1413
|
+
return id === this._id ? this : new MappedType.MappedTypeParameter(id, this._prefix, this._markers, this._name, this._iterateType);
|
|
1414
|
+
}
|
|
1415
|
+
get prefix() {
|
|
1416
|
+
return this._prefix;
|
|
1417
|
+
}
|
|
1418
|
+
withPrefix(prefix) {
|
|
1419
|
+
return prefix === this._prefix ? this : new MappedType.MappedTypeParameter(this._id, prefix, this._markers, this._name, this._iterateType);
|
|
1420
|
+
}
|
|
1421
|
+
get markers() {
|
|
1422
|
+
return this._markers;
|
|
1423
|
+
}
|
|
1424
|
+
withMarkers(markers) {
|
|
1425
|
+
return markers === this._markers ? this : new MappedType.MappedTypeParameter(this._id, this._prefix, markers, this._name, this._iterateType);
|
|
1426
|
+
}
|
|
1427
|
+
get name() {
|
|
1428
|
+
return this._name;
|
|
1429
|
+
}
|
|
1430
|
+
withName(name) {
|
|
1431
|
+
return name === this._name ? this : new MappedType.MappedTypeParameter(this._id, this._prefix, this._markers, name, this._iterateType);
|
|
1432
|
+
}
|
|
1433
|
+
get iterateType() {
|
|
1434
|
+
return this._iterateType.element;
|
|
1435
|
+
}
|
|
1436
|
+
withIterateType(iterateType) {
|
|
1437
|
+
return this.padding.withIterateType(this._iterateType.withElement(iterateType));
|
|
1438
|
+
}
|
|
1439
|
+
acceptJavaScript(v, p) {
|
|
1440
|
+
return v.visitMappedTypeMappedTypeParameter(this, p);
|
|
1441
|
+
}
|
|
1442
|
+
get padding() {
|
|
1443
|
+
const t = this;
|
|
1444
|
+
return new class {
|
|
1445
|
+
get iterateType() {
|
|
1446
|
+
return t._iterateType;
|
|
1447
|
+
}
|
|
1448
|
+
withIterateType(iterateType) {
|
|
1449
|
+
return t._iterateType === iterateType ? t : new MappedType.MappedTypeParameter(t._id, t._prefix, t._markers, t._name, iterateType);
|
|
1450
|
+
}
|
|
1451
|
+
};
|
|
1452
|
+
}
|
|
1453
|
+
};
|
|
1454
|
+
MappedTypeParameter = __decorate([
|
|
1455
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$MappedType$MappedTypeParameter")
|
|
1456
|
+
], MappedTypeParameter);
|
|
1457
|
+
MappedType.MappedTypeParameter = MappedTypeParameter;
|
|
1458
|
+
})(MappedType || (exports.MappedType = MappedType = {}));
|
|
1204
1459
|
let ObjectBindingDeclarations = ObjectBindingDeclarations_1 = class ObjectBindingDeclarations extends (0, support_types_1.JSMixin)(Object) {
|
|
1205
1460
|
constructor(id, prefix, markers, leadingAnnotations, modifiers, typeExpression, bindings, initializer) {
|
|
1206
1461
|
super();
|
|
@@ -1998,6 +2253,7 @@ exports.TypeOperator = TypeOperator = TypeOperator_1 = __decorate([
|
|
|
1998
2253
|
(function (Type) {
|
|
1999
2254
|
Type[Type["ReadOnly"] = 0] = "ReadOnly";
|
|
2000
2255
|
Type[Type["KeyOf"] = 1] = "KeyOf";
|
|
2256
|
+
Type[Type["Unique"] = 2] = "Unique";
|
|
2001
2257
|
})(Type = TypeOperator.Type || (TypeOperator.Type = {}));
|
|
2002
2258
|
})(TypeOperator || (exports.TypeOperator = TypeOperator = {}));
|
|
2003
2259
|
let TypePredicate = TypePredicate_1 = class TypePredicate extends (0, support_types_1.JSMixin)(Object) {
|
|
@@ -2151,6 +2407,7 @@ exports.Unary = Unary = Unary_1 = __decorate([
|
|
|
2151
2407
|
Type[Type["Exclamation"] = 2] = "Exclamation";
|
|
2152
2408
|
Type[Type["QuestionDot"] = 3] = "QuestionDot";
|
|
2153
2409
|
Type[Type["QuestionDotWithDot"] = 4] = "QuestionDotWithDot";
|
|
2410
|
+
Type[Type["Asterisk"] = 5] = "Asterisk";
|
|
2154
2411
|
})(Type = Unary.Type || (Unary.Type = {}));
|
|
2155
2412
|
})(Unary || (exports.Unary = Unary = {}));
|
|
2156
2413
|
let Union = Union_1 = class Union extends (0, support_types_1.JSMixin)(Object) {
|
|
@@ -2344,10 +2601,10 @@ let Yield = Yield_1 = class Yield extends (0, support_types_1.JSMixin)(Object) {
|
|
|
2344
2601
|
return markers === this._markers ? this : new Yield_1(this._id, this._prefix, markers, this._delegated, this._expression, this._type);
|
|
2345
2602
|
}
|
|
2346
2603
|
get delegated() {
|
|
2347
|
-
return this._delegated;
|
|
2604
|
+
return this._delegated.element;
|
|
2348
2605
|
}
|
|
2349
2606
|
withDelegated(delegated) {
|
|
2350
|
-
return
|
|
2607
|
+
return this.padding.withDelegated(this._delegated.withElement(delegated));
|
|
2351
2608
|
}
|
|
2352
2609
|
get expression() {
|
|
2353
2610
|
return this._expression;
|
|
@@ -2364,6 +2621,17 @@ let Yield = Yield_1 = class Yield extends (0, support_types_1.JSMixin)(Object) {
|
|
|
2364
2621
|
acceptJavaScript(v, p) {
|
|
2365
2622
|
return v.visitJsYield(this, p);
|
|
2366
2623
|
}
|
|
2624
|
+
get padding() {
|
|
2625
|
+
const t = this;
|
|
2626
|
+
return new class {
|
|
2627
|
+
get delegated() {
|
|
2628
|
+
return t._delegated;
|
|
2629
|
+
}
|
|
2630
|
+
withDelegated(delegated) {
|
|
2631
|
+
return t._delegated === delegated ? t : new Yield_1(t._id, t._prefix, t._markers, delegated, t._expression, t._type);
|
|
2632
|
+
}
|
|
2633
|
+
};
|
|
2634
|
+
}
|
|
2367
2635
|
};
|
|
2368
2636
|
exports.Yield = Yield;
|
|
2369
2637
|
exports.Yield = Yield = Yield_1 = __decorate([
|
|
@@ -3676,10 +3944,10 @@ let IndexedAccessType = IndexedAccessType_1 = class IndexedAccessType extends (0
|
|
|
3676
3944
|
return objectType === this._objectType ? this : new IndexedAccessType_1(this._id, this._prefix, this._markers, objectType, this._indexType, this._type);
|
|
3677
3945
|
}
|
|
3678
3946
|
get indexType() {
|
|
3679
|
-
return this._indexType
|
|
3947
|
+
return this._indexType;
|
|
3680
3948
|
}
|
|
3681
3949
|
withIndexType(indexType) {
|
|
3682
|
-
return this.
|
|
3950
|
+
return indexType === this._indexType ? this : new IndexedAccessType_1(this._id, this._prefix, this._markers, this._objectType, indexType, this._type);
|
|
3683
3951
|
}
|
|
3684
3952
|
get type() {
|
|
3685
3953
|
return this._type;
|
|
@@ -3690,17 +3958,6 @@ let IndexedAccessType = IndexedAccessType_1 = class IndexedAccessType extends (0
|
|
|
3690
3958
|
acceptJavaScript(v, p) {
|
|
3691
3959
|
return v.visitIndexedAccessType(this, p);
|
|
3692
3960
|
}
|
|
3693
|
-
get padding() {
|
|
3694
|
-
const t = this;
|
|
3695
|
-
return new class {
|
|
3696
|
-
get indexType() {
|
|
3697
|
-
return t._indexType;
|
|
3698
|
-
}
|
|
3699
|
-
withIndexType(indexType) {
|
|
3700
|
-
return t._indexType === indexType ? t : new IndexedAccessType_1(t._id, t._prefix, t._markers, t._objectType, indexType, t._type);
|
|
3701
|
-
}
|
|
3702
|
-
};
|
|
3703
|
-
}
|
|
3704
3961
|
};
|
|
3705
3962
|
exports.IndexedAccessType = IndexedAccessType;
|
|
3706
3963
|
exports.IndexedAccessType = IndexedAccessType = IndexedAccessType_1 = __decorate([
|
|
@@ -3844,6 +4101,53 @@ exports.JsAssignmentOperation = JsAssignmentOperation = JsAssignmentOperation_1
|
|
|
3844
4101
|
Type[Type["QuestionQuestion"] = 0] = "QuestionQuestion";
|
|
3845
4102
|
Type[Type["And"] = 1] = "And";
|
|
3846
4103
|
Type[Type["Or"] = 2] = "Or";
|
|
4104
|
+
Type[Type["Power"] = 3] = "Power";
|
|
3847
4105
|
})(Type = JsAssignmentOperation.Type || (JsAssignmentOperation.Type = {}));
|
|
3848
4106
|
})(JsAssignmentOperation || (exports.JsAssignmentOperation = JsAssignmentOperation = {}));
|
|
4107
|
+
let TypeTreeExpression = TypeTreeExpression_1 = class TypeTreeExpression extends (0, support_types_1.JSMixin)(Object) {
|
|
4108
|
+
constructor(id, prefix, markers, expression) {
|
|
4109
|
+
super();
|
|
4110
|
+
this._id = id;
|
|
4111
|
+
this._prefix = prefix;
|
|
4112
|
+
this._markers = markers;
|
|
4113
|
+
this._expression = expression;
|
|
4114
|
+
}
|
|
4115
|
+
get id() {
|
|
4116
|
+
return this._id;
|
|
4117
|
+
}
|
|
4118
|
+
withId(id) {
|
|
4119
|
+
return id === this._id ? this : new TypeTreeExpression_1(id, this._prefix, this._markers, this._expression);
|
|
4120
|
+
}
|
|
4121
|
+
get prefix() {
|
|
4122
|
+
return this._prefix;
|
|
4123
|
+
}
|
|
4124
|
+
withPrefix(prefix) {
|
|
4125
|
+
return prefix === this._prefix ? this : new TypeTreeExpression_1(this._id, prefix, this._markers, this._expression);
|
|
4126
|
+
}
|
|
4127
|
+
get markers() {
|
|
4128
|
+
return this._markers;
|
|
4129
|
+
}
|
|
4130
|
+
withMarkers(markers) {
|
|
4131
|
+
return markers === this._markers ? this : new TypeTreeExpression_1(this._id, this._prefix, markers, this._expression);
|
|
4132
|
+
}
|
|
4133
|
+
get expression() {
|
|
4134
|
+
return this._expression;
|
|
4135
|
+
}
|
|
4136
|
+
withExpression(expression) {
|
|
4137
|
+
return expression === this._expression ? this : new TypeTreeExpression_1(this._id, this._prefix, this._markers, expression);
|
|
4138
|
+
}
|
|
4139
|
+
acceptJavaScript(v, p) {
|
|
4140
|
+
return v.visitTypeTreeExpression(this, p);
|
|
4141
|
+
}
|
|
4142
|
+
get type() {
|
|
4143
|
+
return extensions.getJavaType(this);
|
|
4144
|
+
}
|
|
4145
|
+
withType(type) {
|
|
4146
|
+
return extensions.withJavaType(this, type);
|
|
4147
|
+
}
|
|
4148
|
+
};
|
|
4149
|
+
exports.TypeTreeExpression = TypeTreeExpression;
|
|
4150
|
+
exports.TypeTreeExpression = TypeTreeExpression = TypeTreeExpression_1 = __decorate([
|
|
4151
|
+
(0, core_1.LstType)("org.openrewrite.javascript.tree.JS$TypeTreeExpression")
|
|
4152
|
+
], TypeTreeExpression);
|
|
3849
4153
|
//# sourceMappingURL=tree.js.map
|