@typescript-deploys/pr-build 5.2.0-pr-53804-5 → 5.2.0-pr-54647-2
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 +5 -5
- package/lib/tsserver.js +11 -7
- package/lib/tsserverlibrary.js +11 -7
- package/lib/typescript.js +11 -7
- package/lib/typingsInstaller.js +2 -2
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.2";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20230616`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -7699,7 +7699,7 @@ var Diagnostics = {
|
|
|
7699
7699
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
7700
7700
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
7701
7701
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
7702
|
-
|
|
7702
|
+
Can_only_convert_string_concatenation_or_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_or_string_literals_95154", "Can only convert string concatenation or string literals"),
|
|
7703
7703
|
Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
|
|
7704
7704
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
7705
7705
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -53649,9 +53649,9 @@ function createTypeChecker(host) {
|
|
|
53649
53649
|
function getConstraintOfTypeParameter(typeParameter) {
|
|
53650
53650
|
return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0;
|
|
53651
53651
|
}
|
|
53652
|
-
function isConstTypeVariable(type) {
|
|
53652
|
+
function isConstTypeVariable(type, depth = 0) {
|
|
53653
53653
|
var _a;
|
|
53654
|
-
return !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, isConstTypeVariable) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type)) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0));
|
|
53654
|
+
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
|
|
53655
53655
|
}
|
|
53656
53656
|
function getConstraintOfIndexedAccess(type) {
|
|
53657
53657
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -65774,7 +65774,7 @@ function createTypeChecker(host) {
|
|
|
65774
65774
|
location = location.parent;
|
|
65775
65775
|
}
|
|
65776
65776
|
if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) {
|
|
65777
|
-
const type =
|
|
65777
|
+
const type = getTypeOfExpression(location);
|
|
65778
65778
|
if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) {
|
|
65779
65779
|
return type;
|
|
65780
65780
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -2305,7 +2305,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2305
2305
|
|
|
2306
2306
|
// src/compiler/corePublic.ts
|
|
2307
2307
|
var versionMajorMinor = "5.2";
|
|
2308
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2308
|
+
var version = `${versionMajorMinor}.0-insiders.20230616`;
|
|
2309
2309
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2310
2310
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2311
2311
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -11197,7 +11197,7 @@ var Diagnostics = {
|
|
|
11197
11197
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
11198
11198
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
11199
11199
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
11200
|
-
|
|
11200
|
+
Can_only_convert_string_concatenation_or_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_or_string_literals_95154", "Can only convert string concatenation or string literals"),
|
|
11201
11201
|
Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
|
|
11202
11202
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
11203
11203
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -58290,9 +58290,9 @@ function createTypeChecker(host) {
|
|
|
58290
58290
|
function getConstraintOfTypeParameter(typeParameter) {
|
|
58291
58291
|
return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0;
|
|
58292
58292
|
}
|
|
58293
|
-
function isConstTypeVariable(type) {
|
|
58293
|
+
function isConstTypeVariable(type, depth = 0) {
|
|
58294
58294
|
var _a;
|
|
58295
|
-
return !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, isConstTypeVariable) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type)) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0));
|
|
58295
|
+
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
|
|
58296
58296
|
}
|
|
58297
58297
|
function getConstraintOfIndexedAccess(type) {
|
|
58298
58298
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -70415,7 +70415,7 @@ function createTypeChecker(host) {
|
|
|
70415
70415
|
location = location.parent;
|
|
70416
70416
|
}
|
|
70417
70417
|
if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) {
|
|
70418
|
-
const type =
|
|
70418
|
+
const type = getTypeOfExpression(location);
|
|
70419
70419
|
if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) {
|
|
70420
70420
|
return type;
|
|
70421
70421
|
}
|
|
@@ -138737,14 +138737,18 @@ function getRefactorActionsToConvertToTemplateString(context) {
|
|
|
138737
138737
|
const { file, startPosition } = context;
|
|
138738
138738
|
const node = getNodeOrParentOfParentheses(file, startPosition);
|
|
138739
138739
|
const maybeBinary = getParentBinaryExpression(node);
|
|
138740
|
+
const nodeIsStringLiteral = isStringLiteral(maybeBinary);
|
|
138740
138741
|
const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
|
|
138741
|
-
if (
|
|
138742
|
+
if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
|
|
138743
|
+
return emptyArray;
|
|
138744
|
+
}
|
|
138745
|
+
if (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
|
|
138742
138746
|
refactorInfo.actions.push(convertStringAction);
|
|
138743
138747
|
return [refactorInfo];
|
|
138744
138748
|
} else if (context.preferences.provideRefactorNotApplicableReason) {
|
|
138745
138749
|
refactorInfo.actions.push({
|
|
138746
138750
|
...convertStringAction,
|
|
138747
|
-
notApplicableReason: getLocaleSpecificMessage(Diagnostics.
|
|
138751
|
+
notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation_or_string_literals)
|
|
138748
138752
|
});
|
|
138749
138753
|
return [refactorInfo];
|
|
138750
138754
|
}
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.2";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230616`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -9002,7 +9002,7 @@ ${lanes.join("\n")}
|
|
|
9002
9002
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
9003
9003
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
9004
9004
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
9005
|
-
|
|
9005
|
+
Can_only_convert_string_concatenation_or_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_or_string_literals_95154", "Can only convert string concatenation or string literals"),
|
|
9006
9006
|
Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
|
|
9007
9007
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
9008
9008
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -56079,9 +56079,9 @@ ${lanes.join("\n")}
|
|
|
56079
56079
|
function getConstraintOfTypeParameter(typeParameter) {
|
|
56080
56080
|
return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0;
|
|
56081
56081
|
}
|
|
56082
|
-
function isConstTypeVariable(type) {
|
|
56082
|
+
function isConstTypeVariable(type, depth = 0) {
|
|
56083
56083
|
var _a;
|
|
56084
|
-
return !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, isConstTypeVariable) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type)) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0));
|
|
56084
|
+
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
|
|
56085
56085
|
}
|
|
56086
56086
|
function getConstraintOfIndexedAccess(type) {
|
|
56087
56087
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -68204,7 +68204,7 @@ ${lanes.join("\n")}
|
|
|
68204
68204
|
location = location.parent;
|
|
68205
68205
|
}
|
|
68206
68206
|
if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) {
|
|
68207
|
-
const type =
|
|
68207
|
+
const type = getTypeOfExpression(location);
|
|
68208
68208
|
if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) {
|
|
68209
68209
|
return type;
|
|
68210
68210
|
}
|
|
@@ -137206,14 +137206,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
137206
137206
|
const { file, startPosition } = context;
|
|
137207
137207
|
const node = getNodeOrParentOfParentheses(file, startPosition);
|
|
137208
137208
|
const maybeBinary = getParentBinaryExpression(node);
|
|
137209
|
+
const nodeIsStringLiteral = isStringLiteral(maybeBinary);
|
|
137209
137210
|
const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
|
|
137210
|
-
if (
|
|
137211
|
+
if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
|
|
137212
|
+
return emptyArray;
|
|
137213
|
+
}
|
|
137214
|
+
if (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
|
|
137211
137215
|
refactorInfo.actions.push(convertStringAction);
|
|
137212
137216
|
return [refactorInfo];
|
|
137213
137217
|
} else if (context.preferences.provideRefactorNotApplicableReason) {
|
|
137214
137218
|
refactorInfo.actions.push({
|
|
137215
137219
|
...convertStringAction,
|
|
137216
|
-
notApplicableReason: getLocaleSpecificMessage(Diagnostics.
|
|
137220
|
+
notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation_or_string_literals)
|
|
137217
137221
|
});
|
|
137218
137222
|
return [refactorInfo];
|
|
137219
137223
|
}
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.2";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230616`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -9002,7 +9002,7 @@ ${lanes.join("\n")}
|
|
|
9002
9002
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
9003
9003
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
9004
9004
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
9005
|
-
|
|
9005
|
+
Can_only_convert_string_concatenation_or_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_or_string_literals_95154", "Can only convert string concatenation or string literals"),
|
|
9006
9006
|
Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
|
|
9007
9007
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
9008
9008
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -56079,9 +56079,9 @@ ${lanes.join("\n")}
|
|
|
56079
56079
|
function getConstraintOfTypeParameter(typeParameter) {
|
|
56080
56080
|
return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0;
|
|
56081
56081
|
}
|
|
56082
|
-
function isConstTypeVariable(type) {
|
|
56082
|
+
function isConstTypeVariable(type, depth = 0) {
|
|
56083
56083
|
var _a;
|
|
56084
|
-
return !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, isConstTypeVariable) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type)) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t)) >= 0));
|
|
56084
|
+
return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0));
|
|
56085
56085
|
}
|
|
56086
56086
|
function getConstraintOfIndexedAccess(type) {
|
|
56087
56087
|
return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0;
|
|
@@ -68204,7 +68204,7 @@ ${lanes.join("\n")}
|
|
|
68204
68204
|
location = location.parent;
|
|
68205
68205
|
}
|
|
68206
68206
|
if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) {
|
|
68207
|
-
const type =
|
|
68207
|
+
const type = getTypeOfExpression(location);
|
|
68208
68208
|
if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) {
|
|
68209
68209
|
return type;
|
|
68210
68210
|
}
|
|
@@ -137221,14 +137221,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
137221
137221
|
const { file, startPosition } = context;
|
|
137222
137222
|
const node = getNodeOrParentOfParentheses(file, startPosition);
|
|
137223
137223
|
const maybeBinary = getParentBinaryExpression(node);
|
|
137224
|
+
const nodeIsStringLiteral = isStringLiteral(maybeBinary);
|
|
137224
137225
|
const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
|
|
137225
|
-
if (
|
|
137226
|
+
if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
|
|
137227
|
+
return emptyArray;
|
|
137228
|
+
}
|
|
137229
|
+
if (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
|
|
137226
137230
|
refactorInfo.actions.push(convertStringAction);
|
|
137227
137231
|
return [refactorInfo];
|
|
137228
137232
|
} else if (context.preferences.provideRefactorNotApplicableReason) {
|
|
137229
137233
|
refactorInfo.actions.push({
|
|
137230
137234
|
...convertStringAction,
|
|
137231
|
-
notApplicableReason: getLocaleSpecificMessage(Diagnostics.
|
|
137235
|
+
notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation_or_string_literals)
|
|
137232
137236
|
});
|
|
137233
137237
|
return [refactorInfo];
|
|
137234
137238
|
}
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.2";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230616`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -7073,7 +7073,7 @@ var Diagnostics = {
|
|
|
7073
7073
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
7074
7074
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
7075
7075
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
7076
|
-
|
|
7076
|
+
Can_only_convert_string_concatenation_or_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_or_string_literals_95154", "Can only convert string concatenation or string literals"),
|
|
7077
7077
|
Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
|
|
7078
7078
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
7079
7079
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.2.0-pr-
|
|
5
|
+
"version": "5.2.0-pr-54647-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"node": "20.1.0",
|
|
116
116
|
"npm": "8.19.4"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "4a58fe91bad1aa6dca65eba3ecd2f26e05cd9a14"
|
|
119
119
|
}
|