typescript 5.5.0-dev.20240313 → 5.5.0-dev.20240315
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/lib/tsc.js +82 -5
- package/lib/tsserver.js +186 -86
- package/lib/typescript.js +186 -86
- package/lib/typingsInstaller.js +5 -1
- package/package.json +2 -2
package/lib/tsserver.js
CHANGED
|
@@ -1760,6 +1760,7 @@ __export(server_exports, {
|
|
|
1760
1760
|
isSuperProperty: () => isSuperProperty,
|
|
1761
1761
|
isSupportedSourceFileName: () => isSupportedSourceFileName,
|
|
1762
1762
|
isSwitchStatement: () => isSwitchStatement,
|
|
1763
|
+
isSyntacticallyString: () => isSyntacticallyString,
|
|
1763
1764
|
isSyntaxList: () => isSyntaxList,
|
|
1764
1765
|
isSyntheticExpression: () => isSyntheticExpression,
|
|
1765
1766
|
isSyntheticReference: () => isSyntheticReference,
|
|
@@ -2326,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2326
2327
|
|
|
2327
2328
|
// src/compiler/corePublic.ts
|
|
2328
2329
|
var versionMajorMinor = "5.5";
|
|
2329
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-dev.20240315`;
|
|
2330
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2331
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2332
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -9675,6 +9676,8 @@ var Diagnostics = {
|
|
|
9675
9676
|
The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
|
|
9676
9677
|
_0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
|
|
9677
9678
|
Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."),
|
|
9679
|
+
Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator: diag(1497, 1 /* Error */, "Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497", "Expression must be enclosed in parentheses to be used as a decorator."),
|
|
9680
|
+
Invalid_syntax_in_decorator: diag(1498, 1 /* Error */, "Invalid_syntax_in_decorator_1498", "Invalid syntax in decorator."),
|
|
9678
9681
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
9679
9682
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
9680
9683
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -11326,6 +11329,8 @@ var Diagnostics = {
|
|
|
11326
11329
|
Add_optional_parameter_to_0: diag(95191, 3 /* Message */, "Add_optional_parameter_to_0_95191", "Add optional parameter to '{0}'"),
|
|
11327
11330
|
Add_optional_parameters_to_0: diag(95192, 3 /* Message */, "Add_optional_parameters_to_0_95192", "Add optional parameters to '{0}'"),
|
|
11328
11331
|
Add_all_optional_parameters: diag(95193, 3 /* Message */, "Add_all_optional_parameters_95193", "Add all optional parameters"),
|
|
11332
|
+
Wrap_in_parentheses: diag(95194, 3 /* Message */, "Wrap_in_parentheses_95194", "Wrap in parentheses"),
|
|
11333
|
+
Wrap_all_invalid_decorator_expressions_in_parentheses: diag(95195, 3 /* Message */, "Wrap_all_invalid_decorator_expressions_in_parentheses_95195", "Wrap all invalid decorator expressions in parentheses"),
|
|
11329
11334
|
No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
|
|
11330
11335
|
Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
|
|
11331
11336
|
JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
|
|
@@ -21910,6 +21915,20 @@ function replaceFirstStar(s, replacement) {
|
|
|
21910
21915
|
function getNameFromImportAttribute(node) {
|
|
21911
21916
|
return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text);
|
|
21912
21917
|
}
|
|
21918
|
+
function isSyntacticallyString(expr) {
|
|
21919
|
+
expr = skipOuterExpressions(expr);
|
|
21920
|
+
switch (expr.kind) {
|
|
21921
|
+
case 226 /* BinaryExpression */:
|
|
21922
|
+
const left = expr.left;
|
|
21923
|
+
const right = expr.right;
|
|
21924
|
+
return expr.operatorToken.kind === 40 /* PlusToken */ && (isSyntacticallyString(left) || isSyntacticallyString(right));
|
|
21925
|
+
case 228 /* TemplateExpression */:
|
|
21926
|
+
case 11 /* StringLiteral */:
|
|
21927
|
+
case 15 /* NoSubstitutionTemplateLiteral */:
|
|
21928
|
+
return true;
|
|
21929
|
+
}
|
|
21930
|
+
return false;
|
|
21931
|
+
}
|
|
21913
21932
|
|
|
21914
21933
|
// src/compiler/factory/baseNodeFactory.ts
|
|
21915
21934
|
function createBaseNodeFactory() {
|
|
@@ -62343,7 +62362,7 @@ function createTypeChecker(host) {
|
|
|
62343
62362
|
const typeVarIndex = typeSet[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
|
|
62344
62363
|
const typeVariable = typeSet[typeVarIndex];
|
|
62345
62364
|
const primitiveType = typeSet[1 - typeVarIndex];
|
|
62346
|
-
if (typeVariable.flags & 8650752 /* TypeVariable */ && (primitiveType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) || includes & 16777216 /* IncludesEmptyObject */)) {
|
|
62365
|
+
if (typeVariable.flags & 8650752 /* TypeVariable */ && (primitiveType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) && !isGenericStringLikeType(primitiveType) || includes & 16777216 /* IncludesEmptyObject */)) {
|
|
62347
62366
|
const constraint = getBaseConstraintOfType(typeVariable);
|
|
62348
62367
|
if (constraint && everyType(constraint, (t) => !!(t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) || isEmptyAnonymousObjectType(t))) {
|
|
62349
62368
|
if (isTypeStrictSubtypeOf(constraint, primitiveType)) {
|
|
@@ -62581,6 +62600,7 @@ function createTypeChecker(host) {
|
|
|
62581
62600
|
return links.resolvedType;
|
|
62582
62601
|
}
|
|
62583
62602
|
function getTemplateLiteralType(texts, types) {
|
|
62603
|
+
var _a, _b;
|
|
62584
62604
|
const unionIndex = findIndex(types, (t) => !!(t.flags & (131072 /* Never */ | 1048576 /* Union */)));
|
|
62585
62605
|
if (unionIndex >= 0) {
|
|
62586
62606
|
return checkCrossProductUnion(types) ? mapType(types[unionIndex], (t) => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : errorType;
|
|
@@ -62588,6 +62608,9 @@ function createTypeChecker(host) {
|
|
|
62588
62608
|
if (contains(types, wildcardType)) {
|
|
62589
62609
|
return wildcardType;
|
|
62590
62610
|
}
|
|
62611
|
+
if (texts.length === 2 && texts[0] === "" && texts[1] === "" && !(types[0].flags & 2944 /* Literal */) && !((_b = (_a = types[0].symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b.some((d) => d.parent.kind === 195 /* InferType */)) && isTypeAssignableTo(types[0], stringType)) {
|
|
62612
|
+
return types[0];
|
|
62613
|
+
}
|
|
62591
62614
|
const newTypes = [];
|
|
62592
62615
|
const newTexts = [];
|
|
62593
62616
|
let text = texts[0];
|
|
@@ -62948,6 +62971,9 @@ function createTypeChecker(host) {
|
|
|
62948
62971
|
function isPatternLiteralType(type) {
|
|
62949
62972
|
return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType) || !!(type.flags & 268435456 /* StringMapping */) && isPatternLiteralPlaceholderType(type.type);
|
|
62950
62973
|
}
|
|
62974
|
+
function isGenericStringLikeType(type) {
|
|
62975
|
+
return !!(type.flags & (134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */)) && !isPatternLiteralType(type);
|
|
62976
|
+
}
|
|
62951
62977
|
function isGenericType(type) {
|
|
62952
62978
|
return !!getGenericObjectFlags(type);
|
|
62953
62979
|
}
|
|
@@ -62970,7 +62996,7 @@ function createTypeChecker(host) {
|
|
|
62970
62996
|
}
|
|
62971
62997
|
return type.objectFlags & 12582912 /* IsGenericType */;
|
|
62972
62998
|
}
|
|
62973
|
-
return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */
|
|
62999
|
+
return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */) || isGenericStringLikeType(type) ? 8388608 /* IsGenericIndexType */ : 0);
|
|
62974
63000
|
}
|
|
62975
63001
|
function getSimplifiedType(type, writing) {
|
|
62976
63002
|
return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type;
|
|
@@ -76237,7 +76263,10 @@ function createTypeChecker(host) {
|
|
|
76237
76263
|
return Debug.fail();
|
|
76238
76264
|
}
|
|
76239
76265
|
function getDecoratorArgumentCount(node, signature) {
|
|
76240
|
-
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) :
|
|
76266
|
+
return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) : (
|
|
76267
|
+
// Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter.
|
|
76268
|
+
Math.min(Math.max(getParameterCount(signature), 1), 2)
|
|
76269
|
+
);
|
|
76241
76270
|
}
|
|
76242
76271
|
function getLegacyDecoratorArgumentCount(node, signature) {
|
|
76243
76272
|
switch (node.parent.kind) {
|
|
@@ -82097,7 +82126,56 @@ function createTypeChecker(host) {
|
|
|
82097
82126
|
}
|
|
82098
82127
|
}
|
|
82099
82128
|
}
|
|
82129
|
+
function checkGrammarDecorator(decorator) {
|
|
82130
|
+
const sourceFile = getSourceFileOfNode(decorator);
|
|
82131
|
+
if (!hasParseDiagnostics(sourceFile)) {
|
|
82132
|
+
let node = decorator.expression;
|
|
82133
|
+
if (isParenthesizedExpression(node)) {
|
|
82134
|
+
return false;
|
|
82135
|
+
}
|
|
82136
|
+
let canHaveCallExpression = true;
|
|
82137
|
+
let errorNode;
|
|
82138
|
+
while (true) {
|
|
82139
|
+
if (isExpressionWithTypeArguments(node) || isNonNullExpression(node)) {
|
|
82140
|
+
node = node.expression;
|
|
82141
|
+
continue;
|
|
82142
|
+
}
|
|
82143
|
+
if (isCallExpression(node)) {
|
|
82144
|
+
if (!canHaveCallExpression) {
|
|
82145
|
+
errorNode = node;
|
|
82146
|
+
}
|
|
82147
|
+
if (node.questionDotToken) {
|
|
82148
|
+
errorNode = node.questionDotToken;
|
|
82149
|
+
}
|
|
82150
|
+
node = node.expression;
|
|
82151
|
+
canHaveCallExpression = false;
|
|
82152
|
+
continue;
|
|
82153
|
+
}
|
|
82154
|
+
if (isPropertyAccessExpression(node)) {
|
|
82155
|
+
if (node.questionDotToken) {
|
|
82156
|
+
errorNode = node.questionDotToken;
|
|
82157
|
+
}
|
|
82158
|
+
node = node.expression;
|
|
82159
|
+
canHaveCallExpression = false;
|
|
82160
|
+
continue;
|
|
82161
|
+
}
|
|
82162
|
+
if (!isIdentifier(node)) {
|
|
82163
|
+
errorNode = node;
|
|
82164
|
+
}
|
|
82165
|
+
break;
|
|
82166
|
+
}
|
|
82167
|
+
if (errorNode) {
|
|
82168
|
+
addRelatedInfo(
|
|
82169
|
+
error2(decorator.expression, Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator),
|
|
82170
|
+
createDiagnosticForNode(errorNode, Diagnostics.Invalid_syntax_in_decorator)
|
|
82171
|
+
);
|
|
82172
|
+
return true;
|
|
82173
|
+
}
|
|
82174
|
+
}
|
|
82175
|
+
return false;
|
|
82176
|
+
}
|
|
82100
82177
|
function checkDecorator(node) {
|
|
82178
|
+
checkGrammarDecorator(node);
|
|
82101
82179
|
const signature = getResolvedSignature(node);
|
|
82102
82180
|
checkDeprecatedSignature(signature, node);
|
|
82103
82181
|
const returnType = getReturnTypeOfSignature(signature);
|
|
@@ -94273,7 +94351,7 @@ function transformTypeScript(context) {
|
|
|
94273
94351
|
),
|
|
94274
94352
|
valueExpression
|
|
94275
94353
|
);
|
|
94276
|
-
const outerAssignment = valueExpression
|
|
94354
|
+
const outerAssignment = isSyntacticallyString(valueExpression) ? innerAssignment : factory2.createAssignment(
|
|
94277
94355
|
factory2.createElementAccessExpression(
|
|
94278
94356
|
currentNamespaceContainerName,
|
|
94279
94357
|
innerAssignment
|
|
@@ -145634,22 +145712,22 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
145634
145712
|
}
|
|
145635
145713
|
return [];
|
|
145636
145714
|
}
|
|
145637
|
-
function getCodeFixesAtPosition(fileName, start2, end,
|
|
145715
|
+
function getCodeFixesAtPosition(fileName, start2, end, errorCodes66, formatOptions, preferences = emptyOptions) {
|
|
145638
145716
|
synchronizeHostData();
|
|
145639
145717
|
const sourceFile = getValidSourceFile(fileName);
|
|
145640
145718
|
const span = createTextSpanFromBounds(start2, end);
|
|
145641
145719
|
const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host);
|
|
145642
|
-
return flatMap(deduplicate(
|
|
145720
|
+
return flatMap(deduplicate(errorCodes66, equateValues, compareValues), (errorCode) => {
|
|
145643
145721
|
cancellationToken.throwIfCancellationRequested();
|
|
145644
145722
|
return ts_codefix_exports.getFixes({ errorCode, sourceFile, span, program, host, cancellationToken, formatContext, preferences });
|
|
145645
145723
|
});
|
|
145646
145724
|
}
|
|
145647
|
-
function getCombinedCodeFix(scope,
|
|
145725
|
+
function getCombinedCodeFix(scope, fixId53, formatOptions, preferences = emptyOptions) {
|
|
145648
145726
|
synchronizeHostData();
|
|
145649
145727
|
Debug.assert(scope.type === "file");
|
|
145650
145728
|
const sourceFile = getValidSourceFile(scope.fileName);
|
|
145651
145729
|
const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host);
|
|
145652
|
-
return ts_codefix_exports.getAllFixes({ fixId:
|
|
145730
|
+
return ts_codefix_exports.getAllFixes({ fixId: fixId53, sourceFile, program, host, cancellationToken, formatContext, preferences });
|
|
145653
145731
|
}
|
|
145654
145732
|
function organizeImports2(args, formatOptions, preferences = emptyOptions) {
|
|
145655
145733
|
synchronizeHostData();
|
|
@@ -147328,14 +147406,14 @@ function createCodeFixActionWithoutFixAll(fixName8, changes, description3) {
|
|
|
147328
147406
|
void 0
|
|
147329
147407
|
);
|
|
147330
147408
|
}
|
|
147331
|
-
function createCodeFixAction(fixName8, changes, description3,
|
|
147332
|
-
return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes,
|
|
147409
|
+
function createCodeFixAction(fixName8, changes, description3, fixId53, fixAllDescription, command) {
|
|
147410
|
+
return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId53, diagnosticToString(fixAllDescription), command);
|
|
147333
147411
|
}
|
|
147334
|
-
function createCodeFixActionMaybeFixAll(fixName8, changes, description3,
|
|
147335
|
-
return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes,
|
|
147412
|
+
function createCodeFixActionMaybeFixAll(fixName8, changes, description3, fixId53, fixAllDescription, command) {
|
|
147413
|
+
return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId53, fixAllDescription && diagnosticToString(fixAllDescription), command);
|
|
147336
147414
|
}
|
|
147337
|
-
function createCodeFixActionWorker(fixName8, description3, changes,
|
|
147338
|
-
return { fixName: fixName8, description: description3, changes, fixId:
|
|
147415
|
+
function createCodeFixActionWorker(fixName8, description3, changes, fixId53, fixAllDescription, command) {
|
|
147416
|
+
return { fixName: fixName8, description: description3, changes, fixId: fixId53, fixAllDescription, commands: command ? [command] : void 0 };
|
|
147339
147417
|
}
|
|
147340
147418
|
function registerCodeFix(reg) {
|
|
147341
147419
|
for (const error2 of reg.errorCodes) {
|
|
@@ -147343,9 +147421,9 @@ function registerCodeFix(reg) {
|
|
|
147343
147421
|
errorCodeToFixes.add(String(error2), reg);
|
|
147344
147422
|
}
|
|
147345
147423
|
if (reg.fixIds) {
|
|
147346
|
-
for (const
|
|
147347
|
-
Debug.assert(!fixIdToRegistration.has(
|
|
147348
|
-
fixIdToRegistration.set(
|
|
147424
|
+
for (const fixId53 of reg.fixIds) {
|
|
147425
|
+
Debug.assert(!fixIdToRegistration.has(fixId53));
|
|
147426
|
+
fixIdToRegistration.set(fixId53, reg);
|
|
147349
147427
|
}
|
|
147350
147428
|
}
|
|
147351
147429
|
}
|
|
@@ -147354,17 +147432,17 @@ function getSupportedErrorCodes() {
|
|
|
147354
147432
|
return errorCodeToFixesArray ?? (errorCodeToFixesArray = arrayFrom(errorCodeToFixes.keys()));
|
|
147355
147433
|
}
|
|
147356
147434
|
function removeFixIdIfFixAllUnavailable(registration, diagnostics) {
|
|
147357
|
-
const { errorCodes:
|
|
147435
|
+
const { errorCodes: errorCodes66 } = registration;
|
|
147358
147436
|
let maybeFixableDiagnostics = 0;
|
|
147359
147437
|
for (const diag2 of diagnostics) {
|
|
147360
|
-
if (contains(
|
|
147438
|
+
if (contains(errorCodes66, diag2.code))
|
|
147361
147439
|
maybeFixableDiagnostics++;
|
|
147362
147440
|
if (maybeFixableDiagnostics > 1)
|
|
147363
147441
|
break;
|
|
147364
147442
|
}
|
|
147365
147443
|
const fixAllUnavailable = maybeFixableDiagnostics < 2;
|
|
147366
|
-
return ({ fixId:
|
|
147367
|
-
return fixAllUnavailable ? action : { ...action, fixId:
|
|
147444
|
+
return ({ fixId: fixId53, fixAllDescription, ...action }) => {
|
|
147445
|
+
return fixAllUnavailable ? action : { ...action, fixId: fixId53, fixAllDescription };
|
|
147368
147446
|
};
|
|
147369
147447
|
}
|
|
147370
147448
|
function getFixes(context) {
|
|
@@ -147381,14 +147459,14 @@ function createCombinedCodeActions(changes, commands) {
|
|
|
147381
147459
|
function createFileTextChanges(fileName, textChanges2) {
|
|
147382
147460
|
return { fileName, textChanges: textChanges2 };
|
|
147383
147461
|
}
|
|
147384
|
-
function codeFixAll(context,
|
|
147462
|
+
function codeFixAll(context, errorCodes66, use) {
|
|
147385
147463
|
const commands = [];
|
|
147386
|
-
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => eachDiagnostic(context,
|
|
147464
|
+
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => eachDiagnostic(context, errorCodes66, (diag2) => use(t, diag2, commands)));
|
|
147387
147465
|
return createCombinedCodeActions(changes, commands.length === 0 ? void 0 : commands);
|
|
147388
147466
|
}
|
|
147389
|
-
function eachDiagnostic(context,
|
|
147467
|
+
function eachDiagnostic(context, errorCodes66, cb) {
|
|
147390
147468
|
for (const diag2 of getDiagnostics(context)) {
|
|
147391
|
-
if (contains(
|
|
147469
|
+
if (contains(errorCodes66, diag2.code)) {
|
|
147392
147470
|
cb(diag2);
|
|
147393
147471
|
}
|
|
147394
147472
|
}
|
|
@@ -151799,10 +151877,10 @@ registerCodeFix({
|
|
|
151799
151877
|
const info = errorCodeFixIdMap[errorCode];
|
|
151800
151878
|
if (!info)
|
|
151801
151879
|
return emptyArray;
|
|
151802
|
-
const { descriptions, fixId:
|
|
151880
|
+
const { descriptions, fixId: fixId53, fixAllDescriptions } = info;
|
|
151803
151881
|
const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => dispatchChanges(changes2, context, errorCode, span.start));
|
|
151804
151882
|
return [
|
|
151805
|
-
createCodeFixActionMaybeFixAll(fixName, changes, descriptions,
|
|
151883
|
+
createCodeFixActionMaybeFixAll(fixName, changes, descriptions, fixId53, fixAllDescriptions)
|
|
151806
151884
|
];
|
|
151807
151885
|
},
|
|
151808
151886
|
fixIds: [fixName, fixAddOverrideId, fixRemoveOverrideId],
|
|
@@ -152607,7 +152685,7 @@ registerCodeFix({
|
|
|
152607
152685
|
},
|
|
152608
152686
|
fixIds: [fixMissingMember, fixMissingFunctionDeclaration, fixMissingProperties, fixMissingAttributes],
|
|
152609
152687
|
getAllCodeActions: (context) => {
|
|
152610
|
-
const { program, fixId:
|
|
152688
|
+
const { program, fixId: fixId53 } = context;
|
|
152611
152689
|
const checker = program.getTypeChecker();
|
|
152612
152690
|
const seen = /* @__PURE__ */ new Map();
|
|
152613
152691
|
const typeDeclToMembers = /* @__PURE__ */ new Map();
|
|
@@ -152617,11 +152695,11 @@ registerCodeFix({
|
|
|
152617
152695
|
if (!info || !addToSeen(seen, getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 /* ObjectLiteral */ ? info.identifier : info.token.text))) {
|
|
152618
152696
|
return;
|
|
152619
152697
|
}
|
|
152620
|
-
if (
|
|
152698
|
+
if (fixId53 === fixMissingFunctionDeclaration && (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */)) {
|
|
152621
152699
|
addFunctionDeclaration(changes, context, info);
|
|
152622
|
-
} else if (
|
|
152700
|
+
} else if (fixId53 === fixMissingProperties && info.kind === 3 /* ObjectLiteral */) {
|
|
152623
152701
|
addObjectLiteralProperties(changes, context, info);
|
|
152624
|
-
} else if (
|
|
152702
|
+
} else if (fixId53 === fixMissingAttributes && info.kind === 4 /* JsxAttributes */) {
|
|
152625
152703
|
addJsxAttributes(changes, context, info);
|
|
152626
152704
|
} else {
|
|
152627
152705
|
if (info.kind === 1 /* Enum */) {
|
|
@@ -154520,21 +154598,21 @@ registerCodeFix({
|
|
|
154520
154598
|
actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types));
|
|
154521
154599
|
}
|
|
154522
154600
|
return actions2;
|
|
154523
|
-
function fix(type2,
|
|
154601
|
+
function fix(type2, fixId53, fixAllDescription) {
|
|
154524
154602
|
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange29(t, sourceFile, typeNode, type2, checker));
|
|
154525
|
-
return createCodeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type2)],
|
|
154603
|
+
return createCodeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type2)], fixId53, fixAllDescription);
|
|
154526
154604
|
}
|
|
154527
154605
|
},
|
|
154528
154606
|
fixIds: [fixIdPlain, fixIdNullable],
|
|
154529
154607
|
getAllCodeActions(context) {
|
|
154530
|
-
const { fixId:
|
|
154608
|
+
const { fixId: fixId53, program, sourceFile } = context;
|
|
154531
154609
|
const checker = program.getTypeChecker();
|
|
154532
154610
|
return codeFixAll(context, errorCodes45, (changes, err) => {
|
|
154533
154611
|
const info = getInfo15(err.file, err.start, checker);
|
|
154534
154612
|
if (!info)
|
|
154535
154613
|
return;
|
|
154536
154614
|
const { typeNode, type } = info;
|
|
154537
|
-
const fixedType = typeNode.kind === 314 /* JSDocNullableType */ &&
|
|
154615
|
+
const fixedType = typeNode.kind === 314 /* JSDocNullableType */ && fixId53 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type;
|
|
154538
154616
|
doChange29(changes, sourceFile, typeNode, fixedType, checker);
|
|
154539
154617
|
});
|
|
154540
154618
|
}
|
|
@@ -157242,11 +157320,31 @@ function flattenInvalidBinaryExpr(node) {
|
|
|
157242
157320
|
}
|
|
157243
157321
|
}
|
|
157244
157322
|
|
|
157245
|
-
// src/services/codefixes/
|
|
157246
|
-
var fixId45 = "
|
|
157247
|
-
var errorCodes58 = [Diagnostics.
|
|
157323
|
+
// src/services/codefixes/wrapDecoratorInParentheses.ts
|
|
157324
|
+
var fixId45 = "wrapDecoratorInParentheses";
|
|
157325
|
+
var errorCodes58 = [Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];
|
|
157248
157326
|
registerCodeFix({
|
|
157249
157327
|
errorCodes: errorCodes58,
|
|
157328
|
+
getCodeActions: function getCodeActionsToWrapDecoratorExpressionInParentheses(context) {
|
|
157329
|
+
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange10(t, context.sourceFile, context.span.start));
|
|
157330
|
+
return [createCodeFixAction(fixId45, changes, Diagnostics.Wrap_in_parentheses, fixId45, Diagnostics.Wrap_all_invalid_decorator_expressions_in_parentheses)];
|
|
157331
|
+
},
|
|
157332
|
+
fixIds: [fixId45],
|
|
157333
|
+
getAllCodeActions: (context) => codeFixAll(context, errorCodes58, (changes, diag2) => makeChange10(changes, diag2.file, diag2.start))
|
|
157334
|
+
});
|
|
157335
|
+
function makeChange10(changeTracker, sourceFile, pos) {
|
|
157336
|
+
const token = getTokenAtPosition(sourceFile, pos);
|
|
157337
|
+
const decorator = findAncestor(token, isDecorator);
|
|
157338
|
+
Debug.assert(!!decorator, "Expected position to be owned by a decorator.");
|
|
157339
|
+
const replacement = factory.createParenthesizedExpression(decorator.expression);
|
|
157340
|
+
changeTracker.replaceNode(sourceFile, decorator.expression, replacement);
|
|
157341
|
+
}
|
|
157342
|
+
|
|
157343
|
+
// src/services/codefixes/convertToMappedObjectType.ts
|
|
157344
|
+
var fixId46 = "fixConvertToMappedObjectType";
|
|
157345
|
+
var errorCodes59 = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];
|
|
157346
|
+
registerCodeFix({
|
|
157347
|
+
errorCodes: errorCodes59,
|
|
157250
157348
|
getCodeActions: function getCodeActionsToConvertToMappedTypeObject(context) {
|
|
157251
157349
|
const { sourceFile, span } = context;
|
|
157252
157350
|
const info = getInfo20(sourceFile, span.start);
|
|
@@ -157254,10 +157352,10 @@ registerCodeFix({
|
|
|
157254
157352
|
return void 0;
|
|
157255
157353
|
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange39(t, sourceFile, info));
|
|
157256
157354
|
const name = idText(info.container.name);
|
|
157257
|
-
return [createCodeFixAction(
|
|
157355
|
+
return [createCodeFixAction(fixId46, changes, [Diagnostics.Convert_0_to_mapped_object_type, name], fixId46, [Diagnostics.Convert_0_to_mapped_object_type, name])];
|
|
157258
157356
|
},
|
|
157259
|
-
fixIds: [
|
|
157260
|
-
getAllCodeActions: (context) => codeFixAll(context,
|
|
157357
|
+
fixIds: [fixId46],
|
|
157358
|
+
getAllCodeActions: (context) => codeFixAll(context, errorCodes59, (changes, diag2) => {
|
|
157261
157359
|
const info = getInfo20(diag2.file, diag2.start);
|
|
157262
157360
|
if (info)
|
|
157263
157361
|
doChange39(changes, diag2.file, info);
|
|
@@ -157305,12 +157403,12 @@ function doChange39(changes, sourceFile, { indexSignature, container }) {
|
|
|
157305
157403
|
}
|
|
157306
157404
|
|
|
157307
157405
|
// src/services/codefixes/removeAccidentalCallParentheses.ts
|
|
157308
|
-
var
|
|
157309
|
-
var
|
|
157406
|
+
var fixId47 = "removeAccidentalCallParentheses";
|
|
157407
|
+
var errorCodes60 = [
|
|
157310
157408
|
Diagnostics.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code
|
|
157311
157409
|
];
|
|
157312
157410
|
registerCodeFix({
|
|
157313
|
-
errorCodes:
|
|
157411
|
+
errorCodes: errorCodes60,
|
|
157314
157412
|
getCodeActions(context) {
|
|
157315
157413
|
const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), isCallExpression);
|
|
157316
157414
|
if (!callExpression) {
|
|
@@ -157319,30 +157417,30 @@ registerCodeFix({
|
|
|
157319
157417
|
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => {
|
|
157320
157418
|
t.deleteRange(context.sourceFile, { pos: callExpression.expression.end, end: callExpression.end });
|
|
157321
157419
|
});
|
|
157322
|
-
return [createCodeFixActionWithoutFixAll(
|
|
157420
|
+
return [createCodeFixActionWithoutFixAll(fixId47, changes, Diagnostics.Remove_parentheses)];
|
|
157323
157421
|
},
|
|
157324
|
-
fixIds: [
|
|
157422
|
+
fixIds: [fixId47]
|
|
157325
157423
|
});
|
|
157326
157424
|
|
|
157327
157425
|
// src/services/codefixes/removeUnnecessaryAwait.ts
|
|
157328
|
-
var
|
|
157329
|
-
var
|
|
157426
|
+
var fixId48 = "removeUnnecessaryAwait";
|
|
157427
|
+
var errorCodes61 = [
|
|
157330
157428
|
Diagnostics.await_has_no_effect_on_the_type_of_this_expression.code
|
|
157331
157429
|
];
|
|
157332
157430
|
registerCodeFix({
|
|
157333
|
-
errorCodes:
|
|
157431
|
+
errorCodes: errorCodes61,
|
|
157334
157432
|
getCodeActions: function getCodeActionsToRemoveUnnecessaryAwait(context) {
|
|
157335
|
-
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) =>
|
|
157433
|
+
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange11(t, context.sourceFile, context.span));
|
|
157336
157434
|
if (changes.length > 0) {
|
|
157337
|
-
return [createCodeFixAction(
|
|
157435
|
+
return [createCodeFixAction(fixId48, changes, Diagnostics.Remove_unnecessary_await, fixId48, Diagnostics.Remove_all_unnecessary_uses_of_await)];
|
|
157338
157436
|
}
|
|
157339
157437
|
},
|
|
157340
|
-
fixIds: [
|
|
157438
|
+
fixIds: [fixId48],
|
|
157341
157439
|
getAllCodeActions: (context) => {
|
|
157342
|
-
return codeFixAll(context,
|
|
157440
|
+
return codeFixAll(context, errorCodes61, (changes, diag2) => makeChange11(changes, diag2.file, diag2));
|
|
157343
157441
|
}
|
|
157344
157442
|
});
|
|
157345
|
-
function
|
|
157443
|
+
function makeChange11(changeTracker, sourceFile, span) {
|
|
157346
157444
|
const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 135 /* AwaitKeyword */);
|
|
157347
157445
|
const awaitExpression = awaitKeyword && tryCast(awaitKeyword.parent, isAwaitExpression);
|
|
157348
157446
|
if (!awaitExpression) {
|
|
@@ -157367,20 +157465,20 @@ function makeChange10(changeTracker, sourceFile, span) {
|
|
|
157367
157465
|
}
|
|
157368
157466
|
|
|
157369
157467
|
// src/services/codefixes/splitTypeOnlyImport.ts
|
|
157370
|
-
var
|
|
157371
|
-
var
|
|
157468
|
+
var errorCodes62 = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code];
|
|
157469
|
+
var fixId49 = "splitTypeOnlyImport";
|
|
157372
157470
|
registerCodeFix({
|
|
157373
|
-
errorCodes:
|
|
157374
|
-
fixIds: [
|
|
157471
|
+
errorCodes: errorCodes62,
|
|
157472
|
+
fixIds: [fixId49],
|
|
157375
157473
|
getCodeActions: function getCodeActionsToSplitTypeOnlyImport(context) {
|
|
157376
157474
|
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => {
|
|
157377
157475
|
return splitTypeOnlyImport(t, getImportDeclaration2(context.sourceFile, context.span), context);
|
|
157378
157476
|
});
|
|
157379
157477
|
if (changes.length) {
|
|
157380
|
-
return [createCodeFixAction(
|
|
157478
|
+
return [createCodeFixAction(fixId49, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId49, Diagnostics.Split_all_invalid_type_only_imports)];
|
|
157381
157479
|
}
|
|
157382
157480
|
},
|
|
157383
|
-
getAllCodeActions: (context) => codeFixAll(context,
|
|
157481
|
+
getAllCodeActions: (context) => codeFixAll(context, errorCodes62, (changes, error2) => {
|
|
157384
157482
|
splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error2), context);
|
|
157385
157483
|
})
|
|
157386
157484
|
});
|
|
@@ -157429,23 +157527,23 @@ function splitTypeOnlyImport(changes, importDeclaration, context) {
|
|
|
157429
157527
|
}
|
|
157430
157528
|
|
|
157431
157529
|
// src/services/codefixes/convertConstToLet.ts
|
|
157432
|
-
var
|
|
157433
|
-
var
|
|
157530
|
+
var fixId50 = "fixConvertConstToLet";
|
|
157531
|
+
var errorCodes63 = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];
|
|
157434
157532
|
registerCodeFix({
|
|
157435
|
-
errorCodes:
|
|
157533
|
+
errorCodes: errorCodes63,
|
|
157436
157534
|
getCodeActions: function getCodeActionsToConvertConstToLet(context) {
|
|
157437
157535
|
const { sourceFile, span, program } = context;
|
|
157438
157536
|
const info = getInfo21(sourceFile, span.start, program);
|
|
157439
157537
|
if (info === void 0)
|
|
157440
157538
|
return;
|
|
157441
157539
|
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange40(t, sourceFile, info.token));
|
|
157442
|
-
return [createCodeFixActionMaybeFixAll(
|
|
157540
|
+
return [createCodeFixActionMaybeFixAll(fixId50, changes, Diagnostics.Convert_const_to_let, fixId50, Diagnostics.Convert_all_const_to_let)];
|
|
157443
157541
|
},
|
|
157444
157542
|
getAllCodeActions: (context) => {
|
|
157445
157543
|
const { program } = context;
|
|
157446
157544
|
const seen = /* @__PURE__ */ new Map();
|
|
157447
157545
|
return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => {
|
|
157448
|
-
eachDiagnostic(context,
|
|
157546
|
+
eachDiagnostic(context, errorCodes63, (diag2) => {
|
|
157449
157547
|
const info = getInfo21(diag2.file, diag2.start, program);
|
|
157450
157548
|
if (info) {
|
|
157451
157549
|
if (addToSeen(seen, getSymbolId(info.symbol))) {
|
|
@@ -157456,7 +157554,7 @@ registerCodeFix({
|
|
|
157456
157554
|
});
|
|
157457
157555
|
}));
|
|
157458
157556
|
},
|
|
157459
|
-
fixIds: [
|
|
157557
|
+
fixIds: [fixId50]
|
|
157460
157558
|
});
|
|
157461
157559
|
function getInfo21(sourceFile, pos, program) {
|
|
157462
157560
|
var _a;
|
|
@@ -157477,11 +157575,11 @@ function doChange40(changes, sourceFile, token) {
|
|
|
157477
157575
|
}
|
|
157478
157576
|
|
|
157479
157577
|
// src/services/codefixes/fixExpectedComma.ts
|
|
157480
|
-
var
|
|
157578
|
+
var fixId51 = "fixExpectedComma";
|
|
157481
157579
|
var expectedErrorCode = Diagnostics._0_expected.code;
|
|
157482
|
-
var
|
|
157580
|
+
var errorCodes64 = [expectedErrorCode];
|
|
157483
157581
|
registerCodeFix({
|
|
157484
|
-
errorCodes:
|
|
157582
|
+
errorCodes: errorCodes64,
|
|
157485
157583
|
getCodeActions(context) {
|
|
157486
157584
|
const { sourceFile } = context;
|
|
157487
157585
|
const info = getInfo22(sourceFile, context.span.start, context.errorCode);
|
|
@@ -157489,15 +157587,15 @@ registerCodeFix({
|
|
|
157489
157587
|
return void 0;
|
|
157490
157588
|
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange41(t, sourceFile, info));
|
|
157491
157589
|
return [createCodeFixAction(
|
|
157492
|
-
|
|
157590
|
+
fixId51,
|
|
157493
157591
|
changes,
|
|
157494
157592
|
[Diagnostics.Change_0_to_1, ";", ","],
|
|
157495
|
-
|
|
157593
|
+
fixId51,
|
|
157496
157594
|
[Diagnostics.Change_0_to_1, ";", ","]
|
|
157497
157595
|
)];
|
|
157498
157596
|
},
|
|
157499
|
-
fixIds: [
|
|
157500
|
-
getAllCodeActions: (context) => codeFixAll(context,
|
|
157597
|
+
fixIds: [fixId51],
|
|
157598
|
+
getAllCodeActions: (context) => codeFixAll(context, errorCodes64, (changes, diag2) => {
|
|
157501
157599
|
const info = getInfo22(diag2.file, diag2.start, diag2.code);
|
|
157502
157600
|
if (info)
|
|
157503
157601
|
doChange41(changes, context.sourceFile, info);
|
|
@@ -157514,25 +157612,25 @@ function doChange41(changes, sourceFile, { node }) {
|
|
|
157514
157612
|
|
|
157515
157613
|
// src/services/codefixes/fixAddVoidToPromise.ts
|
|
157516
157614
|
var fixName7 = "addVoidToPromise";
|
|
157517
|
-
var
|
|
157518
|
-
var
|
|
157615
|
+
var fixId52 = "addVoidToPromise";
|
|
157616
|
+
var errorCodes65 = [
|
|
157519
157617
|
Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,
|
|
157520
157618
|
Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code
|
|
157521
157619
|
];
|
|
157522
157620
|
registerCodeFix({
|
|
157523
|
-
errorCodes:
|
|
157524
|
-
fixIds: [
|
|
157621
|
+
errorCodes: errorCodes65,
|
|
157622
|
+
fixIds: [fixId52],
|
|
157525
157623
|
getCodeActions(context) {
|
|
157526
|
-
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) =>
|
|
157624
|
+
const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange12(t, context.sourceFile, context.span, context.program));
|
|
157527
157625
|
if (changes.length > 0) {
|
|
157528
|
-
return [createCodeFixAction(fixName7, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value,
|
|
157626
|
+
return [createCodeFixAction(fixName7, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId52, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)];
|
|
157529
157627
|
}
|
|
157530
157628
|
},
|
|
157531
157629
|
getAllCodeActions(context) {
|
|
157532
|
-
return codeFixAll(context,
|
|
157630
|
+
return codeFixAll(context, errorCodes65, (changes, diag2) => makeChange12(changes, diag2.file, diag2, context.program, /* @__PURE__ */ new Set()));
|
|
157533
157631
|
}
|
|
157534
157632
|
});
|
|
157535
|
-
function
|
|
157633
|
+
function makeChange12(changes, sourceFile, span, program, seen) {
|
|
157536
157634
|
const node = getTokenAtPosition(sourceFile, span.start);
|
|
157537
157635
|
if (!isIdentifier(node) || !isCallExpression(node.parent) || node.parent.expression !== node || node.parent.arguments.length !== 0)
|
|
157538
157636
|
return;
|
|
@@ -175017,6 +175115,7 @@ __export(ts_exports2, {
|
|
|
175017
175115
|
isSuperProperty: () => isSuperProperty,
|
|
175018
175116
|
isSupportedSourceFileName: () => isSupportedSourceFileName,
|
|
175019
175117
|
isSwitchStatement: () => isSwitchStatement,
|
|
175118
|
+
isSyntacticallyString: () => isSyntacticallyString,
|
|
175020
175119
|
isSyntaxList: () => isSyntaxList,
|
|
175021
175120
|
isSyntheticExpression: () => isSyntheticExpression,
|
|
175022
175121
|
isSyntheticReference: () => isSyntheticReference,
|
|
@@ -186020,10 +186119,10 @@ ${e.message}`;
|
|
|
186020
186119
|
}
|
|
186021
186120
|
return simplifiedResult ? codeActions.map((codeAction) => this.mapCodeFixAction(codeAction)) : codeActions;
|
|
186022
186121
|
}
|
|
186023
|
-
getCombinedCodeFix({ scope, fixId:
|
|
186122
|
+
getCombinedCodeFix({ scope, fixId: fixId53 }, simplifiedResult) {
|
|
186024
186123
|
Debug.assert(scope.type === "file");
|
|
186025
186124
|
const { file, project } = this.getFileAndProject(scope.args);
|
|
186026
|
-
const res = project.getLanguageService().getCombinedCodeFix({ type: "file", fileName: file },
|
|
186125
|
+
const res = project.getLanguageService().getCombinedCodeFix({ type: "file", fileName: file }, fixId53, this.getFormatOptions(file), this.getPreferences(file));
|
|
186027
186126
|
if (simplifiedResult) {
|
|
186028
186127
|
return { changes: this.mapTextChangesToCodeEdits(res.changes), commands: res.commands };
|
|
186029
186128
|
} else {
|
|
@@ -186062,8 +186161,8 @@ ${e.message}`;
|
|
|
186062
186161
|
mapCodeAction({ description: description3, changes, commands }) {
|
|
186063
186162
|
return { description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands };
|
|
186064
186163
|
}
|
|
186065
|
-
mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId:
|
|
186066
|
-
return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId:
|
|
186164
|
+
mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId: fixId53, fixAllDescription }) {
|
|
186165
|
+
return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId: fixId53, fixAllDescription };
|
|
186067
186166
|
}
|
|
186068
186167
|
mapTextChangesToCodeEdits(textChanges2) {
|
|
186069
186168
|
return textChanges2.map((change) => this.mapTextChangeToCodeEdit(change));
|
|
@@ -189793,6 +189892,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
189793
189892
|
isSuperProperty,
|
|
189794
189893
|
isSupportedSourceFileName,
|
|
189795
189894
|
isSwitchStatement,
|
|
189895
|
+
isSyntacticallyString,
|
|
189796
189896
|
isSyntaxList,
|
|
189797
189897
|
isSyntheticExpression,
|
|
189798
189898
|
isSyntheticReference,
|