@typescript-deploys/pr-build 5.3.0-pr-54647-9 → 5.3.0-pr-55601-8
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 +12 -5
- package/lib/tsserver.js +48 -16
- package/lib/typesMap.json +2 -2
- package/lib/typescript.js +48 -16
- 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.3";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20230902`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -7688,7 +7688,7 @@ var Diagnostics = {
|
|
|
7688
7688
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
7689
7689
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
7690
7690
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
7691
|
-
|
|
7691
|
+
Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
|
|
7692
7692
|
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"),
|
|
7693
7693
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
7694
7694
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -53028,7 +53028,7 @@ function createTypeChecker(host) {
|
|
|
53028
53028
|
if (!lateSymbol)
|
|
53029
53029
|
lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */));
|
|
53030
53030
|
const earlySymbol = earlySymbols && earlySymbols.get(memberName);
|
|
53031
|
-
if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
|
|
53031
|
+
if (!(parent.flags & 32 /* Class */) && (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol)) {
|
|
53032
53032
|
const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
|
|
53033
53033
|
const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);
|
|
53034
53034
|
forEach(declarations, (declaration) => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));
|
|
@@ -72779,6 +72779,10 @@ function createTypeChecker(host) {
|
|
|
72779
72779
|
const nextTypes = [];
|
|
72780
72780
|
const isAsync = (getFunctionFlags(func) & 2 /* Async */) !== 0;
|
|
72781
72781
|
forEachYieldExpression(func.body, (yieldExpression) => {
|
|
72782
|
+
const statement = findAncestor(yieldExpression, isStatement);
|
|
72783
|
+
if (canHaveFlowNode(statement) && !statement.flowNode && !compilerOptions.allowUnreachableCode) {
|
|
72784
|
+
return;
|
|
72785
|
+
}
|
|
72782
72786
|
const yieldExpressionType = yieldExpression.expression ? checkExpression(yieldExpression.expression, checkMode) : undefinedWideningType;
|
|
72783
72787
|
pushIfUnique(yieldTypes, getYieldedTypeOfYieldExpression(yieldExpression, yieldExpressionType, anyType, isAsync));
|
|
72784
72788
|
let nextType;
|
|
@@ -72869,6 +72873,9 @@ function createTypeChecker(host) {
|
|
|
72869
72873
|
hasReturnOfTypeNever = true;
|
|
72870
72874
|
return;
|
|
72871
72875
|
}
|
|
72876
|
+
if (!returnStatement.flowNode && !compilerOptions.allowUnreachableCode) {
|
|
72877
|
+
return;
|
|
72878
|
+
}
|
|
72872
72879
|
let type = checkExpressionCached(expr, checkMode && checkMode & ~8 /* SkipGenericFunctions */);
|
|
72873
72880
|
if (functionFlags & 2 /* Async */) {
|
|
72874
72881
|
type = unwrapAwaitedType(checkAwaitedType(
|
|
@@ -75042,7 +75049,7 @@ function createTypeChecker(host) {
|
|
|
75042
75049
|
const isPrivate = isPrivateIdentifier(name);
|
|
75043
75050
|
const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0;
|
|
75044
75051
|
const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames;
|
|
75045
|
-
const memberName = name &&
|
|
75052
|
+
const memberName = name && getEffectivePropertyNameForPropertyNameNode(name);
|
|
75046
75053
|
if (memberName) {
|
|
75047
75054
|
switch (member.kind) {
|
|
75048
75055
|
case 177 /* GetAccessor */:
|
|
@@ -75089,7 +75096,7 @@ function createTypeChecker(host) {
|
|
|
75089
75096
|
const memberNameNode = member.name;
|
|
75090
75097
|
const isStaticMember = isStatic(member);
|
|
75091
75098
|
if (isStaticMember && memberNameNode) {
|
|
75092
|
-
const memberName =
|
|
75099
|
+
const memberName = getEffectivePropertyNameForPropertyNameNode(memberNameNode);
|
|
75093
75100
|
switch (memberName) {
|
|
75094
75101
|
case "name":
|
|
75095
75102
|
case "length":
|
package/lib/tsserver.js
CHANGED
|
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2327
2327
|
|
|
2328
2328
|
// src/compiler/corePublic.ts
|
|
2329
2329
|
var versionMajorMinor = "5.3";
|
|
2330
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2330
|
+
var version = `${versionMajorMinor}.0-insiders.20230902`;
|
|
2331
2331
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2332
2332
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2333
2333
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -11207,7 +11207,7 @@ var Diagnostics = {
|
|
|
11207
11207
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
11208
11208
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
11209
11209
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
11210
|
-
|
|
11210
|
+
Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
|
|
11211
11211
|
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"),
|
|
11212
11212
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
11213
11213
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -57730,7 +57730,7 @@ function createTypeChecker(host) {
|
|
|
57730
57730
|
if (!lateSymbol)
|
|
57731
57731
|
lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */));
|
|
57732
57732
|
const earlySymbol = earlySymbols && earlySymbols.get(memberName);
|
|
57733
|
-
if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
|
|
57733
|
+
if (!(parent2.flags & 32 /* Class */) && (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol)) {
|
|
57734
57734
|
const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
|
|
57735
57735
|
const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);
|
|
57736
57736
|
forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));
|
|
@@ -77481,6 +77481,10 @@ function createTypeChecker(host) {
|
|
|
77481
77481
|
const nextTypes = [];
|
|
77482
77482
|
const isAsync = (getFunctionFlags(func) & 2 /* Async */) !== 0;
|
|
77483
77483
|
forEachYieldExpression(func.body, (yieldExpression) => {
|
|
77484
|
+
const statement = findAncestor(yieldExpression, isStatement);
|
|
77485
|
+
if (canHaveFlowNode(statement) && !statement.flowNode && !compilerOptions.allowUnreachableCode) {
|
|
77486
|
+
return;
|
|
77487
|
+
}
|
|
77484
77488
|
const yieldExpressionType = yieldExpression.expression ? checkExpression(yieldExpression.expression, checkMode) : undefinedWideningType;
|
|
77485
77489
|
pushIfUnique(yieldTypes, getYieldedTypeOfYieldExpression(yieldExpression, yieldExpressionType, anyType, isAsync));
|
|
77486
77490
|
let nextType;
|
|
@@ -77571,6 +77575,9 @@ function createTypeChecker(host) {
|
|
|
77571
77575
|
hasReturnOfTypeNever = true;
|
|
77572
77576
|
return;
|
|
77573
77577
|
}
|
|
77578
|
+
if (!returnStatement.flowNode && !compilerOptions.allowUnreachableCode) {
|
|
77579
|
+
return;
|
|
77580
|
+
}
|
|
77574
77581
|
let type = checkExpressionCached(expr, checkMode && checkMode & ~8 /* SkipGenericFunctions */);
|
|
77575
77582
|
if (functionFlags & 2 /* Async */) {
|
|
77576
77583
|
type = unwrapAwaitedType(checkAwaitedType(
|
|
@@ -79744,7 +79751,7 @@ function createTypeChecker(host) {
|
|
|
79744
79751
|
const isPrivate = isPrivateIdentifier(name);
|
|
79745
79752
|
const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0;
|
|
79746
79753
|
const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames;
|
|
79747
|
-
const memberName = name &&
|
|
79754
|
+
const memberName = name && getEffectivePropertyNameForPropertyNameNode(name);
|
|
79748
79755
|
if (memberName) {
|
|
79749
79756
|
switch (member.kind) {
|
|
79750
79757
|
case 177 /* GetAccessor */:
|
|
@@ -79791,7 +79798,7 @@ function createTypeChecker(host) {
|
|
|
79791
79798
|
const memberNameNode = member.name;
|
|
79792
79799
|
const isStaticMember = isStatic(member);
|
|
79793
79800
|
if (isStaticMember && memberNameNode) {
|
|
79794
|
-
const memberName =
|
|
79801
|
+
const memberName = getEffectivePropertyNameForPropertyNameNode(memberNameNode);
|
|
79795
79802
|
switch (memberName) {
|
|
79796
79803
|
case "name":
|
|
79797
79804
|
case "length":
|
|
@@ -135265,6 +135272,21 @@ function createPatternMatch(kind, isCaseSensitive) {
|
|
|
135265
135272
|
function createPatternMatcher(pattern) {
|
|
135266
135273
|
const stringToWordSpans = /* @__PURE__ */ new Map();
|
|
135267
135274
|
const dotSeparatedSegments = pattern.trim().split(".").map((p) => createSegment(p.trim()));
|
|
135275
|
+
if (dotSeparatedSegments.length === 1 && dotSeparatedSegments[0].totalTextChunk.text === "") {
|
|
135276
|
+
return {
|
|
135277
|
+
getMatchForLastSegmentOfPattern: () => createPatternMatch(
|
|
135278
|
+
2 /* substring */,
|
|
135279
|
+
/*isCaseSensitive*/
|
|
135280
|
+
true
|
|
135281
|
+
),
|
|
135282
|
+
getFullMatch: () => createPatternMatch(
|
|
135283
|
+
2 /* substring */,
|
|
135284
|
+
/*isCaseSensitive*/
|
|
135285
|
+
true
|
|
135286
|
+
),
|
|
135287
|
+
patternContainsDots: false
|
|
135288
|
+
};
|
|
135289
|
+
}
|
|
135268
135290
|
if (dotSeparatedSegments.some((segment) => !segment.subWordTextChunks.length))
|
|
135269
135291
|
return void 0;
|
|
135270
135292
|
return {
|
|
@@ -140407,16 +140429,12 @@ function getRefactorActionsToConvertToTemplateString(context) {
|
|
|
140407
140429
|
const { file, startPosition } = context;
|
|
140408
140430
|
const node = getNodeOrParentOfParentheses(file, startPosition);
|
|
140409
140431
|
const maybeBinary = getParentBinaryExpression(node);
|
|
140410
|
-
const nodeIsStringLiteral = isStringLiteral(maybeBinary);
|
|
140411
140432
|
const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
|
|
140412
|
-
if (
|
|
140413
|
-
return emptyArray;
|
|
140414
|
-
}
|
|
140415
|
-
if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) {
|
|
140433
|
+
if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
|
|
140416
140434
|
refactorInfo.actions.push(convertStringAction);
|
|
140417
140435
|
return [refactorInfo];
|
|
140418
140436
|
} else if (context.preferences.provideRefactorNotApplicableReason) {
|
|
140419
|
-
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.
|
|
140437
|
+
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation) });
|
|
140420
140438
|
return [refactorInfo];
|
|
140421
140439
|
}
|
|
140422
140440
|
return emptyArray;
|
|
@@ -147475,8 +147493,8 @@ registerCodeFix({
|
|
|
147475
147493
|
fixIds: [fixId7],
|
|
147476
147494
|
getAllCodeActions: (context) => codeFixAll(context, errorCodes7, (changes, diag2) => makeChange7(changes, diag2.file, diag2.start))
|
|
147477
147495
|
});
|
|
147478
|
-
function makeChange7(changeTracker, sourceFile,
|
|
147479
|
-
const token = getTokenAtPosition(sourceFile,
|
|
147496
|
+
function makeChange7(changeTracker, sourceFile, start2) {
|
|
147497
|
+
const token = getTokenAtPosition(sourceFile, start2);
|
|
147480
147498
|
const param = token.parent;
|
|
147481
147499
|
if (!isParameter(param)) {
|
|
147482
147500
|
return Debug.fail("Tried to add a parameter name to a non-parameter: " + Debug.formatSyntaxKind(token.kind));
|
|
@@ -147484,20 +147502,34 @@ function makeChange7(changeTracker, sourceFile, pos) {
|
|
|
147484
147502
|
const i = param.parent.parameters.indexOf(param);
|
|
147485
147503
|
Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one.");
|
|
147486
147504
|
Debug.assert(i > -1, "Parameter not found in parent parameter list.");
|
|
147487
|
-
|
|
147505
|
+
let end = param.name.getEnd();
|
|
147506
|
+
let typeNode = factory.createTypeReferenceNode(
|
|
147488
147507
|
param.name,
|
|
147489
147508
|
/*typeArguments*/
|
|
147490
147509
|
void 0
|
|
147491
147510
|
);
|
|
147511
|
+
let nextParam = tryGetNextParam(sourceFile, param);
|
|
147512
|
+
while (nextParam) {
|
|
147513
|
+
typeNode = factory.createArrayTypeNode(typeNode);
|
|
147514
|
+
end = nextParam.getEnd();
|
|
147515
|
+
nextParam = tryGetNextParam(sourceFile, nextParam);
|
|
147516
|
+
}
|
|
147492
147517
|
const replacement = factory.createParameterDeclaration(
|
|
147493
147518
|
param.modifiers,
|
|
147494
147519
|
param.dotDotDotToken,
|
|
147495
147520
|
"arg" + i,
|
|
147496
147521
|
param.questionToken,
|
|
147497
|
-
param.dotDotDotToken ? factory.createArrayTypeNode(typeNode) : typeNode,
|
|
147522
|
+
param.dotDotDotToken && !isArrayTypeNode(typeNode) ? factory.createArrayTypeNode(typeNode) : typeNode,
|
|
147498
147523
|
param.initializer
|
|
147499
147524
|
);
|
|
147500
|
-
changeTracker.
|
|
147525
|
+
changeTracker.replaceRange(sourceFile, createRange(param.getStart(sourceFile), end), replacement);
|
|
147526
|
+
}
|
|
147527
|
+
function tryGetNextParam(sourceFile, param) {
|
|
147528
|
+
const nextToken = findNextToken(param.name, param.parent, sourceFile);
|
|
147529
|
+
if (nextToken && nextToken.kind === 23 /* OpenBracketToken */ && isArrayBindingPattern(nextToken.parent) && isParameter(nextToken.parent.parent)) {
|
|
147530
|
+
return nextToken.parent.parent;
|
|
147531
|
+
}
|
|
147532
|
+
return void 0;
|
|
147501
147533
|
}
|
|
147502
147534
|
|
|
147503
147535
|
// src/services/codefixes/addOptionalPropertyUndefined.ts
|
package/lib/typesMap.json
CHANGED
|
@@ -361,7 +361,7 @@
|
|
|
361
361
|
"passport": "passport",
|
|
362
362
|
"passport-local": "passport-local",
|
|
363
363
|
"path": "pathjs",
|
|
364
|
-
"pdfkit":"pdfkit",
|
|
364
|
+
"pdfkit": "pdfkit",
|
|
365
365
|
"peer": "peerjs",
|
|
366
366
|
"peg": "pegjs",
|
|
367
367
|
"photoswipe": "photoswipe",
|
|
@@ -494,4 +494,4 @@
|
|
|
494
494
|
"ZeroClipboard": "zeroclipboard",
|
|
495
495
|
"ZSchema-browser": "z-schema"
|
|
496
496
|
}
|
|
497
|
-
}
|
|
497
|
+
}
|
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.3";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230902`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -8990,7 +8990,7 @@ ${lanes.join("\n")}
|
|
|
8990
8990
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
8991
8991
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
8992
8992
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
8993
|
-
|
|
8993
|
+
Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
|
|
8994
8994
|
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"),
|
|
8995
8995
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
8996
8996
|
Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
|
|
@@ -55497,7 +55497,7 @@ ${lanes.join("\n")}
|
|
|
55497
55497
|
if (!lateSymbol)
|
|
55498
55498
|
lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */));
|
|
55499
55499
|
const earlySymbol = earlySymbols && earlySymbols.get(memberName);
|
|
55500
|
-
if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) {
|
|
55500
|
+
if (!(parent2.flags & 32 /* Class */) && (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol)) {
|
|
55501
55501
|
const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations;
|
|
55502
55502
|
const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName);
|
|
55503
55503
|
forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name));
|
|
@@ -75248,6 +75248,10 @@ ${lanes.join("\n")}
|
|
|
75248
75248
|
const nextTypes = [];
|
|
75249
75249
|
const isAsync = (getFunctionFlags(func) & 2 /* Async */) !== 0;
|
|
75250
75250
|
forEachYieldExpression(func.body, (yieldExpression) => {
|
|
75251
|
+
const statement = findAncestor(yieldExpression, isStatement);
|
|
75252
|
+
if (canHaveFlowNode(statement) && !statement.flowNode && !compilerOptions.allowUnreachableCode) {
|
|
75253
|
+
return;
|
|
75254
|
+
}
|
|
75251
75255
|
const yieldExpressionType = yieldExpression.expression ? checkExpression(yieldExpression.expression, checkMode) : undefinedWideningType;
|
|
75252
75256
|
pushIfUnique(yieldTypes, getYieldedTypeOfYieldExpression(yieldExpression, yieldExpressionType, anyType, isAsync));
|
|
75253
75257
|
let nextType;
|
|
@@ -75338,6 +75342,9 @@ ${lanes.join("\n")}
|
|
|
75338
75342
|
hasReturnOfTypeNever = true;
|
|
75339
75343
|
return;
|
|
75340
75344
|
}
|
|
75345
|
+
if (!returnStatement.flowNode && !compilerOptions.allowUnreachableCode) {
|
|
75346
|
+
return;
|
|
75347
|
+
}
|
|
75341
75348
|
let type = checkExpressionCached(expr, checkMode && checkMode & ~8 /* SkipGenericFunctions */);
|
|
75342
75349
|
if (functionFlags & 2 /* Async */) {
|
|
75343
75350
|
type = unwrapAwaitedType(checkAwaitedType(
|
|
@@ -77511,7 +77518,7 @@ ${lanes.join("\n")}
|
|
|
77511
77518
|
const isPrivate = isPrivateIdentifier(name);
|
|
77512
77519
|
const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0;
|
|
77513
77520
|
const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames;
|
|
77514
|
-
const memberName = name &&
|
|
77521
|
+
const memberName = name && getEffectivePropertyNameForPropertyNameNode(name);
|
|
77515
77522
|
if (memberName) {
|
|
77516
77523
|
switch (member.kind) {
|
|
77517
77524
|
case 177 /* GetAccessor */:
|
|
@@ -77558,7 +77565,7 @@ ${lanes.join("\n")}
|
|
|
77558
77565
|
const memberNameNode = member.name;
|
|
77559
77566
|
const isStaticMember = isStatic(member);
|
|
77560
77567
|
if (isStaticMember && memberNameNode) {
|
|
77561
|
-
const memberName =
|
|
77568
|
+
const memberName = getEffectivePropertyNameForPropertyNameNode(memberNameNode);
|
|
77562
77569
|
switch (memberName) {
|
|
77563
77570
|
case "name":
|
|
77564
77571
|
case "length":
|
|
@@ -133605,6 +133612,21 @@ ${lanes.join("\n")}
|
|
|
133605
133612
|
function createPatternMatcher(pattern) {
|
|
133606
133613
|
const stringToWordSpans = /* @__PURE__ */ new Map();
|
|
133607
133614
|
const dotSeparatedSegments = pattern.trim().split(".").map((p) => createSegment(p.trim()));
|
|
133615
|
+
if (dotSeparatedSegments.length === 1 && dotSeparatedSegments[0].totalTextChunk.text === "") {
|
|
133616
|
+
return {
|
|
133617
|
+
getMatchForLastSegmentOfPattern: () => createPatternMatch(
|
|
133618
|
+
2 /* substring */,
|
|
133619
|
+
/*isCaseSensitive*/
|
|
133620
|
+
true
|
|
133621
|
+
),
|
|
133622
|
+
getFullMatch: () => createPatternMatch(
|
|
133623
|
+
2 /* substring */,
|
|
133624
|
+
/*isCaseSensitive*/
|
|
133625
|
+
true
|
|
133626
|
+
),
|
|
133627
|
+
patternContainsDots: false
|
|
133628
|
+
};
|
|
133629
|
+
}
|
|
133608
133630
|
if (dotSeparatedSegments.some((segment) => !segment.subWordTextChunks.length))
|
|
133609
133631
|
return void 0;
|
|
133610
133632
|
return {
|
|
@@ -138869,16 +138891,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
138869
138891
|
const { file, startPosition } = context;
|
|
138870
138892
|
const node = getNodeOrParentOfParentheses(file, startPosition);
|
|
138871
138893
|
const maybeBinary = getParentBinaryExpression(node);
|
|
138872
|
-
const nodeIsStringLiteral = isStringLiteral(maybeBinary);
|
|
138873
138894
|
const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
|
|
138874
|
-
if (
|
|
138875
|
-
return emptyArray;
|
|
138876
|
-
}
|
|
138877
|
-
if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) {
|
|
138895
|
+
if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
|
|
138878
138896
|
refactorInfo.actions.push(convertStringAction);
|
|
138879
138897
|
return [refactorInfo];
|
|
138880
138898
|
} else if (context.preferences.provideRefactorNotApplicableReason) {
|
|
138881
|
-
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.
|
|
138899
|
+
refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation) });
|
|
138882
138900
|
return [refactorInfo];
|
|
138883
138901
|
}
|
|
138884
138902
|
return emptyArray;
|
|
@@ -146152,8 +146170,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146152
146170
|
});
|
|
146153
146171
|
|
|
146154
146172
|
// src/services/codefixes/addNameToNamelessParameter.ts
|
|
146155
|
-
function makeChange7(changeTracker, sourceFile,
|
|
146156
|
-
const token = getTokenAtPosition(sourceFile,
|
|
146173
|
+
function makeChange7(changeTracker, sourceFile, start) {
|
|
146174
|
+
const token = getTokenAtPosition(sourceFile, start);
|
|
146157
146175
|
const param = token.parent;
|
|
146158
146176
|
if (!isParameter(param)) {
|
|
146159
146177
|
return Debug.fail("Tried to add a parameter name to a non-parameter: " + Debug.formatSyntaxKind(token.kind));
|
|
@@ -146161,20 +146179,34 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
146161
146179
|
const i = param.parent.parameters.indexOf(param);
|
|
146162
146180
|
Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one.");
|
|
146163
146181
|
Debug.assert(i > -1, "Parameter not found in parent parameter list.");
|
|
146164
|
-
|
|
146182
|
+
let end = param.name.getEnd();
|
|
146183
|
+
let typeNode = factory.createTypeReferenceNode(
|
|
146165
146184
|
param.name,
|
|
146166
146185
|
/*typeArguments*/
|
|
146167
146186
|
void 0
|
|
146168
146187
|
);
|
|
146188
|
+
let nextParam = tryGetNextParam(sourceFile, param);
|
|
146189
|
+
while (nextParam) {
|
|
146190
|
+
typeNode = factory.createArrayTypeNode(typeNode);
|
|
146191
|
+
end = nextParam.getEnd();
|
|
146192
|
+
nextParam = tryGetNextParam(sourceFile, nextParam);
|
|
146193
|
+
}
|
|
146169
146194
|
const replacement = factory.createParameterDeclaration(
|
|
146170
146195
|
param.modifiers,
|
|
146171
146196
|
param.dotDotDotToken,
|
|
146172
146197
|
"arg" + i,
|
|
146173
146198
|
param.questionToken,
|
|
146174
|
-
param.dotDotDotToken ? factory.createArrayTypeNode(typeNode) : typeNode,
|
|
146199
|
+
param.dotDotDotToken && !isArrayTypeNode(typeNode) ? factory.createArrayTypeNode(typeNode) : typeNode,
|
|
146175
146200
|
param.initializer
|
|
146176
146201
|
);
|
|
146177
|
-
changeTracker.
|
|
146202
|
+
changeTracker.replaceRange(sourceFile, createRange(param.getStart(sourceFile), end), replacement);
|
|
146203
|
+
}
|
|
146204
|
+
function tryGetNextParam(sourceFile, param) {
|
|
146205
|
+
const nextToken = findNextToken(param.name, param.parent, sourceFile);
|
|
146206
|
+
if (nextToken && nextToken.kind === 23 /* OpenBracketToken */ && isArrayBindingPattern(nextToken.parent) && isParameter(nextToken.parent.parent)) {
|
|
146207
|
+
return nextToken.parent.parent;
|
|
146208
|
+
}
|
|
146209
|
+
return void 0;
|
|
146178
146210
|
}
|
|
146179
146211
|
var fixId7, errorCodes7;
|
|
146180
146212
|
var init_addNameToNamelessParameter = __esm({
|
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.3";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230902`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -7065,7 +7065,7 @@ var Diagnostics = {
|
|
|
7065
7065
|
Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
|
|
7066
7066
|
Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
|
|
7067
7067
|
Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
|
|
7068
|
-
|
|
7068
|
+
Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
|
|
7069
7069
|
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"),
|
|
7070
7070
|
Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
|
|
7071
7071
|
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.3.0-pr-
|
|
5
|
+
"version": "5.3.0-pr-55601-8",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"node": "20.1.0",
|
|
114
114
|
"npm": "8.19.4"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "e8398b84acc121aaea2e4e75ffb98d09d69cd0d9"
|
|
117
117
|
}
|