@typescript-deploys/pr-build 5.3.0-pr-56220-2 → 5.3.0-pr-56271-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +6 -9
- package/lib/tsserver.js +50 -105
- package/lib/typescript.js +50 -105
- package/lib/typingsInstaller.js +3 -8
- 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.20231101`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -30689,7 +30689,8 @@ var Parser;
|
|
|
30689
30689
|
parseExpected(21 /* OpenParenToken */);
|
|
30690
30690
|
let initializer;
|
|
30691
30691
|
if (token() !== 27 /* SemicolonToken */) {
|
|
30692
|
-
if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) ||
|
|
30692
|
+
if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || // this one is meant to allow of
|
|
30693
|
+
token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine)) {
|
|
30693
30694
|
initializer = parseVariableDeclarationList(
|
|
30694
30695
|
/*inForStatementInitializer*/
|
|
30695
30696
|
true
|
|
@@ -31010,12 +31011,6 @@ var Parser;
|
|
|
31010
31011
|
function isUsingDeclaration() {
|
|
31011
31012
|
return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine);
|
|
31012
31013
|
}
|
|
31013
|
-
function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() {
|
|
31014
|
-
return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(
|
|
31015
|
-
/*disallowOf*/
|
|
31016
|
-
true
|
|
31017
|
-
);
|
|
31018
|
-
}
|
|
31019
31014
|
function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) {
|
|
31020
31015
|
if (nextToken() === 160 /* UsingKeyword */) {
|
|
31021
31016
|
return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf);
|
|
@@ -58098,7 +58093,9 @@ function createTypeChecker(host) {
|
|
|
58098
58093
|
if (checkType === wildcardType || extendsType === wildcardType) {
|
|
58099
58094
|
return wildcardType;
|
|
58100
58095
|
}
|
|
58101
|
-
const
|
|
58096
|
+
const checkTypeNode = skipTypeParentheses(root.node.checkType);
|
|
58097
|
+
const extendsTypeNode = skipTypeParentheses(root.node.extendsType);
|
|
58098
|
+
const checkTuples = isSimpleTupleType(checkTypeNode) && isSimpleTupleType(extendsTypeNode) && length(checkTypeNode.elements) === length(extendsTypeNode.elements);
|
|
58102
58099
|
const checkTypeDeferred = isDeferredType(checkType, checkTuples);
|
|
58103
58100
|
let combinedMapper;
|
|
58104
58101
|
if (root.inferTypeParameters) {
|
package/lib/tsserver.js
CHANGED
|
@@ -2328,7 +2328,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2328
2328
|
|
|
2329
2329
|
// src/compiler/corePublic.ts
|
|
2330
2330
|
var versionMajorMinor = "5.3";
|
|
2331
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2331
|
+
var version = `${versionMajorMinor}.0-insiders.20231101`;
|
|
2332
2332
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2333
2333
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2334
2334
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -35093,7 +35093,8 @@ var Parser;
|
|
|
35093
35093
|
parseExpected(21 /* OpenParenToken */);
|
|
35094
35094
|
let initializer;
|
|
35095
35095
|
if (token() !== 27 /* SemicolonToken */) {
|
|
35096
|
-
if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) ||
|
|
35096
|
+
if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || // this one is meant to allow of
|
|
35097
|
+
token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine)) {
|
|
35097
35098
|
initializer = parseVariableDeclarationList(
|
|
35098
35099
|
/*inForStatementInitializer*/
|
|
35099
35100
|
true
|
|
@@ -35414,12 +35415,6 @@ var Parser;
|
|
|
35414
35415
|
function isUsingDeclaration() {
|
|
35415
35416
|
return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine);
|
|
35416
35417
|
}
|
|
35417
|
-
function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() {
|
|
35418
|
-
return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(
|
|
35419
|
-
/*disallowOf*/
|
|
35420
|
-
true
|
|
35421
|
-
);
|
|
35422
|
-
}
|
|
35423
35418
|
function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) {
|
|
35424
35419
|
if (nextToken() === 160 /* UsingKeyword */) {
|
|
35425
35420
|
return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf);
|
|
@@ -62802,7 +62797,9 @@ function createTypeChecker(host) {
|
|
|
62802
62797
|
if (checkType === wildcardType || extendsType === wildcardType) {
|
|
62803
62798
|
return wildcardType;
|
|
62804
62799
|
}
|
|
62805
|
-
const
|
|
62800
|
+
const checkTypeNode = skipTypeParentheses(root.node.checkType);
|
|
62801
|
+
const extendsTypeNode = skipTypeParentheses(root.node.extendsType);
|
|
62802
|
+
const checkTuples = isSimpleTupleType(checkTypeNode) && isSimpleTupleType(extendsTypeNode) && length(checkTypeNode.elements) === length(extendsTypeNode.elements);
|
|
62806
62803
|
const checkTypeDeferred = isDeferredType(checkType, checkTuples);
|
|
62807
62804
|
let combinedMapper;
|
|
62808
62805
|
if (root.inferTypeParameters) {
|
|
@@ -159439,109 +159436,57 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
159439
159436
|
function addPropertySymbol(symbol, insertAwait, insertQuestionDot) {
|
|
159440
159437
|
var _a;
|
|
159441
159438
|
const computedPropertyName = firstDefined(symbol.declarations, (decl) => tryCast(getNameOfDeclaration(decl), isComputedPropertyName));
|
|
159442
|
-
if (
|
|
159443
|
-
|
|
159444
|
-
|
|
159445
|
-
|
|
159446
|
-
|
|
159447
|
-
|
|
159448
|
-
|
|
159449
|
-
|
|
159450
|
-
|
|
159451
|
-
|
|
159452
|
-
|
|
159453
|
-
}
|
|
159454
|
-
if (addToSeen(seenPropertySymbols, nameSymbolId)) {
|
|
159455
|
-
const leftMostName = getLeftMostName(computedPropertyNameExpression);
|
|
159456
|
-
const leftMostNameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName);
|
|
159457
|
-
const firstAccessibleSymbol = leftMostNameSymbol && getFirstSymbolInChain(leftMostNameSymbol, contextToken, typeChecker);
|
|
159458
|
-
if (!firstAccessibleSymbol) {
|
|
159459
|
-
addLiteralSymbol();
|
|
159460
|
-
return;
|
|
159461
|
-
}
|
|
159462
|
-
const index = symbols.length;
|
|
159463
|
-
symbols.push(nameSymbol);
|
|
159464
|
-
const moduleSymbol = firstAccessibleSymbol.parent;
|
|
159465
|
-
if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
|
|
159466
|
-
const node2 = preferences.includeCompletionsWithInsertText ? createComputedPropertyAccess(nameSymbol, leftMostNameSymbol, computedPropertyNameExpression) : void 0;
|
|
159467
|
-
if (!node2) {
|
|
159468
|
-
symbols[index] = symbol;
|
|
159439
|
+
if (computedPropertyName) {
|
|
159440
|
+
const leftMostName = getLeftMostName(computedPropertyName.expression);
|
|
159441
|
+
const nameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName);
|
|
159442
|
+
const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker);
|
|
159443
|
+
const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol);
|
|
159444
|
+
if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) {
|
|
159445
|
+
const index = symbols.length;
|
|
159446
|
+
symbols.push(firstAccessibleSymbol);
|
|
159447
|
+
const moduleSymbol = firstAccessibleSymbol.parent;
|
|
159448
|
+
if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
|
|
159449
|
+
symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) };
|
|
159469
159450
|
} else {
|
|
159470
|
-
const
|
|
159471
|
-
|
|
159472
|
-
|
|
159473
|
-
|
|
159474
|
-
|
|
159475
|
-
|
|
159476
|
-
|
|
159477
|
-
|
|
159478
|
-
|
|
159479
|
-
|
|
159480
|
-
|
|
159451
|
+
const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0;
|
|
159452
|
+
const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo(
|
|
159453
|
+
[{
|
|
159454
|
+
exportKind: 0 /* Named */,
|
|
159455
|
+
moduleFileName: fileName,
|
|
159456
|
+
isFromPackageJson: false,
|
|
159457
|
+
moduleSymbol,
|
|
159458
|
+
symbol: firstAccessibleSymbol,
|
|
159459
|
+
targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags
|
|
159460
|
+
}],
|
|
159461
|
+
position,
|
|
159462
|
+
isValidTypeOnlyAliasUseSite(location)
|
|
159463
|
+
) || {};
|
|
159464
|
+
if (moduleSpecifier) {
|
|
159465
|
+
const origin = {
|
|
159466
|
+
kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */),
|
|
159467
|
+
moduleSymbol,
|
|
159468
|
+
isDefaultExport: false,
|
|
159469
|
+
symbolName: firstAccessibleSymbol.name,
|
|
159470
|
+
exportName: firstAccessibleSymbol.name,
|
|
159471
|
+
fileName,
|
|
159472
|
+
moduleSpecifier
|
|
159473
|
+
};
|
|
159474
|
+
symbolToOriginInfoMap[index] = origin;
|
|
159475
|
+
}
|
|
159481
159476
|
}
|
|
159482
|
-
} else {
|
|
159483
|
-
|
|
159484
|
-
|
|
159485
|
-
[{
|
|
159486
|
-
exportKind: 0 /* Named */,
|
|
159487
|
-
moduleFileName: fileName,
|
|
159488
|
-
isFromPackageJson: false,
|
|
159489
|
-
moduleSymbol,
|
|
159490
|
-
symbol: firstAccessibleSymbol,
|
|
159491
|
-
targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags
|
|
159492
|
-
}],
|
|
159493
|
-
position,
|
|
159494
|
-
isValidTypeOnlyAliasUseSite(location)
|
|
159495
|
-
) || {};
|
|
159496
|
-
if (moduleSpecifier) {
|
|
159497
|
-
const origin = {
|
|
159498
|
-
kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */),
|
|
159499
|
-
moduleSymbol,
|
|
159500
|
-
isDefaultExport: false,
|
|
159501
|
-
symbolName: firstAccessibleSymbol.name,
|
|
159502
|
-
exportName: firstAccessibleSymbol.name,
|
|
159503
|
-
fileName,
|
|
159504
|
-
moduleSpecifier
|
|
159505
|
-
};
|
|
159506
|
-
symbolToOriginInfoMap[index] = origin;
|
|
159477
|
+
} else if (preferences.includeCompletionsWithInsertText) {
|
|
159478
|
+
if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) {
|
|
159479
|
+
return;
|
|
159507
159480
|
}
|
|
159481
|
+
addSymbolOriginInfo(symbol);
|
|
159482
|
+
addSymbolSortInfo(symbol);
|
|
159483
|
+
symbols.push(symbol);
|
|
159508
159484
|
}
|
|
159509
|
-
}
|
|
159510
|
-
function addLiteralSymbol() {
|
|
159485
|
+
} else {
|
|
159511
159486
|
addSymbolOriginInfo(symbol);
|
|
159512
159487
|
addSymbolSortInfo(symbol);
|
|
159513
159488
|
symbols.push(symbol);
|
|
159514
159489
|
}
|
|
159515
|
-
function createComputedPropertyAccess(nameSymbol2, leftMostNameSymbol, computedPropertyNameExpression2) {
|
|
159516
|
-
let node2;
|
|
159517
|
-
if (!isTransientSymbol(nameSymbol2)) {
|
|
159518
|
-
node2 = typeChecker.symbolToEntityName(
|
|
159519
|
-
nameSymbol2,
|
|
159520
|
-
/*meaning*/
|
|
159521
|
-
void 0,
|
|
159522
|
-
contextToken,
|
|
159523
|
-
16384 /* UseAliasDefinedOutsideCurrentScope */
|
|
159524
|
-
);
|
|
159525
|
-
} else {
|
|
159526
|
-
let createPropertyAccess2 = function(n) {
|
|
159527
|
-
if (isIdentifier(n)) {
|
|
159528
|
-
Debug.assertNode(leftMostNodeAccessExpression, isExpression);
|
|
159529
|
-
return leftMostNodeAccessExpression;
|
|
159530
|
-
}
|
|
159531
|
-
return factory.createPropertyAccessExpression(createPropertyAccess2(n.expression), n.name);
|
|
159532
|
-
};
|
|
159533
|
-
var createPropertyAccess = createPropertyAccess2;
|
|
159534
|
-
const leftMostNodeAccessExpression = typeChecker.symbolToNode(
|
|
159535
|
-
leftMostNameSymbol,
|
|
159536
|
-
/*meaning*/
|
|
159537
|
-
void 0,
|
|
159538
|
-
contextToken,
|
|
159539
|
-
16384 /* UseAliasDefinedOutsideCurrentScope */
|
|
159540
|
-
);
|
|
159541
|
-
node2 = createPropertyAccess2(computedPropertyNameExpression2);
|
|
159542
|
-
}
|
|
159543
|
-
return node2;
|
|
159544
|
-
}
|
|
159545
159490
|
function addSymbolSortInfo(symbol2) {
|
|
159546
159491
|
if (isStaticProperty(symbol2)) {
|
|
159547
159492
|
symbolToSortTextMap[getSymbolId(symbol2)] = SortText.LocalDeclarationPriority;
|
|
@@ -160512,7 +160457,7 @@ function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, js
|
|
|
160512
160457
|
return { name: JSON.stringify(name), needsConvertPropertyAccess: false };
|
|
160513
160458
|
case 2 /* PropertyAccess */:
|
|
160514
160459
|
case 1 /* Global */:
|
|
160515
|
-
return name.charCodeAt(0) === 32 /* space */ ? void 0 : { name, needsConvertPropertyAccess:
|
|
160460
|
+
return name.charCodeAt(0) === 32 /* space */ ? void 0 : { name, needsConvertPropertyAccess: true };
|
|
160516
160461
|
case 5 /* None */:
|
|
160517
160462
|
case 4 /* String */:
|
|
160518
160463
|
return validNameResult;
|
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.20231101`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -33165,7 +33165,8 @@ ${lanes.join("\n")}
|
|
|
33165
33165
|
parseExpected(21 /* OpenParenToken */);
|
|
33166
33166
|
let initializer;
|
|
33167
33167
|
if (token() !== 27 /* SemicolonToken */) {
|
|
33168
|
-
if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) ||
|
|
33168
|
+
if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || // this one is meant to allow of
|
|
33169
|
+
token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine)) {
|
|
33169
33170
|
initializer = parseVariableDeclarationList(
|
|
33170
33171
|
/*inForStatementInitializer*/
|
|
33171
33172
|
true
|
|
@@ -33486,12 +33487,6 @@ ${lanes.join("\n")}
|
|
|
33486
33487
|
function isUsingDeclaration() {
|
|
33487
33488
|
return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine);
|
|
33488
33489
|
}
|
|
33489
|
-
function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() {
|
|
33490
|
-
return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(
|
|
33491
|
-
/*disallowOf*/
|
|
33492
|
-
true
|
|
33493
|
-
);
|
|
33494
|
-
}
|
|
33495
33490
|
function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) {
|
|
33496
33491
|
if (nextToken() === 160 /* UsingKeyword */) {
|
|
33497
33492
|
return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf);
|
|
@@ -60569,7 +60564,9 @@ ${lanes.join("\n")}
|
|
|
60569
60564
|
if (checkType === wildcardType || extendsType === wildcardType) {
|
|
60570
60565
|
return wildcardType;
|
|
60571
60566
|
}
|
|
60572
|
-
const
|
|
60567
|
+
const checkTypeNode = skipTypeParentheses(root.node.checkType);
|
|
60568
|
+
const extendsTypeNode = skipTypeParentheses(root.node.extendsType);
|
|
60569
|
+
const checkTuples = isSimpleTupleType(checkTypeNode) && isSimpleTupleType(extendsTypeNode) && length(checkTypeNode.elements) === length(extendsTypeNode.elements);
|
|
60573
60570
|
const checkTypeDeferred = isDeferredType(checkType, checkTuples);
|
|
60574
60571
|
let combinedMapper;
|
|
60575
60572
|
if (root.inferTypeParameters) {
|
|
@@ -158655,109 +158652,57 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
158655
158652
|
function addPropertySymbol(symbol, insertAwait, insertQuestionDot) {
|
|
158656
158653
|
var _a;
|
|
158657
158654
|
const computedPropertyName = firstDefined(symbol.declarations, (decl) => tryCast(getNameOfDeclaration(decl), isComputedPropertyName));
|
|
158658
|
-
if (
|
|
158659
|
-
|
|
158660
|
-
|
|
158661
|
-
|
|
158662
|
-
|
|
158663
|
-
|
|
158664
|
-
|
|
158665
|
-
|
|
158666
|
-
|
|
158667
|
-
|
|
158668
|
-
|
|
158669
|
-
}
|
|
158670
|
-
if (addToSeen(seenPropertySymbols, nameSymbolId)) {
|
|
158671
|
-
const leftMostName = getLeftMostName(computedPropertyNameExpression);
|
|
158672
|
-
const leftMostNameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName);
|
|
158673
|
-
const firstAccessibleSymbol = leftMostNameSymbol && getFirstSymbolInChain(leftMostNameSymbol, contextToken, typeChecker);
|
|
158674
|
-
if (!firstAccessibleSymbol) {
|
|
158675
|
-
addLiteralSymbol();
|
|
158676
|
-
return;
|
|
158677
|
-
}
|
|
158678
|
-
const index = symbols.length;
|
|
158679
|
-
symbols.push(nameSymbol);
|
|
158680
|
-
const moduleSymbol = firstAccessibleSymbol.parent;
|
|
158681
|
-
if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
|
|
158682
|
-
const node2 = preferences.includeCompletionsWithInsertText ? createComputedPropertyAccess(nameSymbol, leftMostNameSymbol, computedPropertyNameExpression) : void 0;
|
|
158683
|
-
if (!node2) {
|
|
158684
|
-
symbols[index] = symbol;
|
|
158655
|
+
if (computedPropertyName) {
|
|
158656
|
+
const leftMostName = getLeftMostName(computedPropertyName.expression);
|
|
158657
|
+
const nameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName);
|
|
158658
|
+
const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker);
|
|
158659
|
+
const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol);
|
|
158660
|
+
if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) {
|
|
158661
|
+
const index = symbols.length;
|
|
158662
|
+
symbols.push(firstAccessibleSymbol);
|
|
158663
|
+
const moduleSymbol = firstAccessibleSymbol.parent;
|
|
158664
|
+
if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
|
|
158665
|
+
symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) };
|
|
158685
158666
|
} else {
|
|
158686
|
-
const
|
|
158687
|
-
|
|
158688
|
-
|
|
158689
|
-
|
|
158690
|
-
|
|
158691
|
-
|
|
158692
|
-
|
|
158693
|
-
|
|
158694
|
-
|
|
158695
|
-
|
|
158696
|
-
|
|
158667
|
+
const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0;
|
|
158668
|
+
const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo(
|
|
158669
|
+
[{
|
|
158670
|
+
exportKind: 0 /* Named */,
|
|
158671
|
+
moduleFileName: fileName,
|
|
158672
|
+
isFromPackageJson: false,
|
|
158673
|
+
moduleSymbol,
|
|
158674
|
+
symbol: firstAccessibleSymbol,
|
|
158675
|
+
targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags
|
|
158676
|
+
}],
|
|
158677
|
+
position,
|
|
158678
|
+
isValidTypeOnlyAliasUseSite(location)
|
|
158679
|
+
) || {};
|
|
158680
|
+
if (moduleSpecifier) {
|
|
158681
|
+
const origin = {
|
|
158682
|
+
kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */),
|
|
158683
|
+
moduleSymbol,
|
|
158684
|
+
isDefaultExport: false,
|
|
158685
|
+
symbolName: firstAccessibleSymbol.name,
|
|
158686
|
+
exportName: firstAccessibleSymbol.name,
|
|
158687
|
+
fileName,
|
|
158688
|
+
moduleSpecifier
|
|
158689
|
+
};
|
|
158690
|
+
symbolToOriginInfoMap[index] = origin;
|
|
158691
|
+
}
|
|
158697
158692
|
}
|
|
158698
|
-
} else {
|
|
158699
|
-
|
|
158700
|
-
|
|
158701
|
-
[{
|
|
158702
|
-
exportKind: 0 /* Named */,
|
|
158703
|
-
moduleFileName: fileName,
|
|
158704
|
-
isFromPackageJson: false,
|
|
158705
|
-
moduleSymbol,
|
|
158706
|
-
symbol: firstAccessibleSymbol,
|
|
158707
|
-
targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags
|
|
158708
|
-
}],
|
|
158709
|
-
position,
|
|
158710
|
-
isValidTypeOnlyAliasUseSite(location)
|
|
158711
|
-
) || {};
|
|
158712
|
-
if (moduleSpecifier) {
|
|
158713
|
-
const origin = {
|
|
158714
|
-
kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */),
|
|
158715
|
-
moduleSymbol,
|
|
158716
|
-
isDefaultExport: false,
|
|
158717
|
-
symbolName: firstAccessibleSymbol.name,
|
|
158718
|
-
exportName: firstAccessibleSymbol.name,
|
|
158719
|
-
fileName,
|
|
158720
|
-
moduleSpecifier
|
|
158721
|
-
};
|
|
158722
|
-
symbolToOriginInfoMap[index] = origin;
|
|
158693
|
+
} else if (preferences.includeCompletionsWithInsertText) {
|
|
158694
|
+
if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) {
|
|
158695
|
+
return;
|
|
158723
158696
|
}
|
|
158697
|
+
addSymbolOriginInfo(symbol);
|
|
158698
|
+
addSymbolSortInfo(symbol);
|
|
158699
|
+
symbols.push(symbol);
|
|
158724
158700
|
}
|
|
158725
|
-
}
|
|
158726
|
-
function addLiteralSymbol() {
|
|
158701
|
+
} else {
|
|
158727
158702
|
addSymbolOriginInfo(symbol);
|
|
158728
158703
|
addSymbolSortInfo(symbol);
|
|
158729
158704
|
symbols.push(symbol);
|
|
158730
158705
|
}
|
|
158731
|
-
function createComputedPropertyAccess(nameSymbol2, leftMostNameSymbol, computedPropertyNameExpression2) {
|
|
158732
|
-
let node2;
|
|
158733
|
-
if (!isTransientSymbol(nameSymbol2)) {
|
|
158734
|
-
node2 = typeChecker.symbolToEntityName(
|
|
158735
|
-
nameSymbol2,
|
|
158736
|
-
/*meaning*/
|
|
158737
|
-
void 0,
|
|
158738
|
-
contextToken,
|
|
158739
|
-
16384 /* UseAliasDefinedOutsideCurrentScope */
|
|
158740
|
-
);
|
|
158741
|
-
} else {
|
|
158742
|
-
let createPropertyAccess2 = function(n) {
|
|
158743
|
-
if (isIdentifier(n)) {
|
|
158744
|
-
Debug.assertNode(leftMostNodeAccessExpression, isExpression);
|
|
158745
|
-
return leftMostNodeAccessExpression;
|
|
158746
|
-
}
|
|
158747
|
-
return factory.createPropertyAccessExpression(createPropertyAccess2(n.expression), n.name);
|
|
158748
|
-
};
|
|
158749
|
-
var createPropertyAccess = createPropertyAccess2;
|
|
158750
|
-
const leftMostNodeAccessExpression = typeChecker.symbolToNode(
|
|
158751
|
-
leftMostNameSymbol,
|
|
158752
|
-
/*meaning*/
|
|
158753
|
-
void 0,
|
|
158754
|
-
contextToken,
|
|
158755
|
-
16384 /* UseAliasDefinedOutsideCurrentScope */
|
|
158756
|
-
);
|
|
158757
|
-
node2 = createPropertyAccess2(computedPropertyNameExpression2);
|
|
158758
|
-
}
|
|
158759
|
-
return node2;
|
|
158760
|
-
}
|
|
158761
158706
|
function addSymbolSortInfo(symbol2) {
|
|
158762
158707
|
if (isStaticProperty(symbol2)) {
|
|
158763
158708
|
symbolToSortTextMap[getSymbolId(symbol2)] = SortText.LocalDeclarationPriority;
|
|
@@ -159728,7 +159673,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
159728
159673
|
return { name: JSON.stringify(name), needsConvertPropertyAccess: false };
|
|
159729
159674
|
case 2 /* PropertyAccess */:
|
|
159730
159675
|
case 1 /* Global */:
|
|
159731
|
-
return name.charCodeAt(0) === 32 /* space */ ? void 0 : { name, needsConvertPropertyAccess:
|
|
159676
|
+
return name.charCodeAt(0) === 32 /* space */ ? void 0 : { name, needsConvertPropertyAccess: true };
|
|
159732
159677
|
case 5 /* None */:
|
|
159733
159678
|
case 4 /* String */:
|
|
159734
159679
|
return validNameResult;
|
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.20231101`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -22502,7 +22502,8 @@ var Parser;
|
|
|
22502
22502
|
parseExpected(21 /* OpenParenToken */);
|
|
22503
22503
|
let initializer;
|
|
22504
22504
|
if (token() !== 27 /* SemicolonToken */) {
|
|
22505
|
-
if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) ||
|
|
22505
|
+
if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || // this one is meant to allow of
|
|
22506
|
+
token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine)) {
|
|
22506
22507
|
initializer = parseVariableDeclarationList(
|
|
22507
22508
|
/*inForStatementInitializer*/
|
|
22508
22509
|
true
|
|
@@ -22823,12 +22824,6 @@ var Parser;
|
|
|
22823
22824
|
function isUsingDeclaration() {
|
|
22824
22825
|
return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine);
|
|
22825
22826
|
}
|
|
22826
|
-
function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() {
|
|
22827
|
-
return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(
|
|
22828
|
-
/*disallowOf*/
|
|
22829
|
-
true
|
|
22830
|
-
);
|
|
22831
|
-
}
|
|
22832
22827
|
function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) {
|
|
22833
22828
|
if (nextToken() === 160 /* UsingKeyword */) {
|
|
22834
22829
|
return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf);
|
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-56271-4",
|
|
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": "cf0ab372a5dc72266599cf62687f928c0c7df3f7"
|
|
119
119
|
}
|