@typescript-deploys/pr-build 5.3.0-pr-56220-2 → 5.3.0-pr-56281-6

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/lib.es5.d.ts CHANGED
@@ -1275,6 +1275,12 @@ interface ReadonlyArray<T> {
1275
1275
  * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1276
1276
  */
1277
1277
  filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[];
1278
+ /**
1279
+ * Returns the non-Falsy elements of an array
1280
+ * @param predicate Must be exactly "Boolean"
1281
+ * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1282
+ */
1283
+ filter(predicate: BooleanConstructor, thisArg?: any): (T extends false | 0 | "" | null | undefined | 0n ? never : T)[];
1278
1284
  /**
1279
1285
  * Returns the elements of an array that meet the condition specified in a callback function.
1280
1286
  * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
@@ -1466,6 +1472,12 @@ interface Array<T> {
1466
1472
  * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1467
1473
  */
1468
1474
  filter<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[];
1475
+ /**
1476
+ * Returns the non-Falsy elements of an array
1477
+ * @param predicate Must be exactly "Boolean"
1478
+ * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
1479
+ */
1480
+ filter(predicate: BooleanConstructor, thisArg?: any): (T extends false | 0 | "" | null | undefined | 0n ? never : T)[];
1469
1481
  /**
1470
1482
  * Returns the elements of an array that meet the condition specified in a callback function.
1471
1483
  * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
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.20231031`;
21
+ var version = `${versionMajorMinor}.0-insiders.20231102`;
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) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) {
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);
@@ -55012,20 +55007,33 @@ function createTypeChecker(host) {
55012
55007
  return emptyArray;
55013
55008
  }
55014
55009
  function getSignaturesOfType(type, kind) {
55015
- const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
55016
- if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {
55010
+ function carveoutResult(type2, kind2) {
55011
+ if (kind2 === 0 /* Call */ && type2.flags & 1048576 /* Union */) {
55012
+ let memberName;
55013
+ if (everyType(type2, (t) => {
55014
+ var _a;
55015
+ return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
55016
+ })) {
55017
+ if (type2.arrayFallbackSignatures) {
55018
+ return type2.arrayFallbackSignatures;
55019
+ }
55020
+ const arrayArg = mapType(type2, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
55021
+ const arrayType = createArrayType(arrayArg, someType(type2, (t) => isReadonlyArraySymbol(t.symbol.parent)));
55022
+ return type2.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind2);
55023
+ }
55024
+ }
55025
+ return void 0;
55026
+ }
55027
+ let result = carveoutResult(type, kind);
55028
+ if (result)
55029
+ return result;
55030
+ if (kind === 0 /* Call */ && type.flags & 1048576 /* Union */) {
55017
55031
  if (type.arrayFallbackSignatures) {
55018
55032
  return type.arrayFallbackSignatures;
55019
55033
  }
55020
- let memberName;
55021
- if (everyType(type, (t) => {
55022
- var _a;
55023
- return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
55024
- })) {
55025
- const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
55026
- const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
55027
- return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
55028
- }
55034
+ }
55035
+ result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
55036
+ if (kind === 0 /* Call */ && type.flags & 1048576 /* Union */) {
55029
55037
  type.arrayFallbackSignatures = result;
55030
55038
  }
55031
55039
  return result;
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.20231031`;
2331
+ var version = `${versionMajorMinor}.0-insiders.20231102`;
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) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) {
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);
@@ -59716,20 +59711,33 @@ function createTypeChecker(host) {
59716
59711
  return emptyArray;
59717
59712
  }
59718
59713
  function getSignaturesOfType(type, kind) {
59719
- const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
59720
- if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {
59714
+ function carveoutResult(type2, kind2) {
59715
+ if (kind2 === 0 /* Call */ && type2.flags & 1048576 /* Union */) {
59716
+ let memberName;
59717
+ if (everyType(type2, (t) => {
59718
+ var _a;
59719
+ return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
59720
+ })) {
59721
+ if (type2.arrayFallbackSignatures) {
59722
+ return type2.arrayFallbackSignatures;
59723
+ }
59724
+ const arrayArg = mapType(type2, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
59725
+ const arrayType = createArrayType(arrayArg, someType(type2, (t) => isReadonlyArraySymbol(t.symbol.parent)));
59726
+ return type2.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind2);
59727
+ }
59728
+ }
59729
+ return void 0;
59730
+ }
59731
+ let result = carveoutResult(type, kind);
59732
+ if (result)
59733
+ return result;
59734
+ if (kind === 0 /* Call */ && type.flags & 1048576 /* Union */) {
59721
59735
  if (type.arrayFallbackSignatures) {
59722
59736
  return type.arrayFallbackSignatures;
59723
59737
  }
59724
- let memberName;
59725
- if (everyType(type, (t) => {
59726
- var _a;
59727
- return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
59728
- })) {
59729
- const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
59730
- const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
59731
- return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
59732
- }
59738
+ }
59739
+ result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
59740
+ if (kind === 0 /* Call */ && type.flags & 1048576 /* Union */) {
59733
59741
  type.arrayFallbackSignatures = result;
59734
59742
  }
59735
59743
  return result;
@@ -159439,109 +159447,57 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
159439
159447
  function addPropertySymbol(symbol, insertAwait, insertQuestionDot) {
159440
159448
  var _a;
159441
159449
  const computedPropertyName = firstDefined(symbol.declarations, (decl) => tryCast(getNameOfDeclaration(decl), isComputedPropertyName));
159442
- if (!computedPropertyName) {
159443
- addLiteralSymbol();
159444
- return;
159445
- }
159446
- const computedPropertyNameExpression = computedPropertyName.expression;
159447
- const name = isEntityName(computedPropertyNameExpression) ? computedPropertyNameExpression : isPropertyAccessExpression(computedPropertyNameExpression) ? computedPropertyNameExpression.name : void 0;
159448
- const nameSymbol = name && typeChecker.getSymbolAtLocation(name);
159449
- const nameSymbolId = nameSymbol && getSymbolId(nameSymbol);
159450
- if (!nameSymbolId) {
159451
- addLiteralSymbol();
159452
- return;
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;
159450
+ if (computedPropertyName) {
159451
+ const leftMostName = getLeftMostName(computedPropertyName.expression);
159452
+ const nameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName);
159453
+ const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker);
159454
+ const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol);
159455
+ if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) {
159456
+ const index = symbols.length;
159457
+ symbols.push(firstAccessibleSymbol);
159458
+ const moduleSymbol = firstAccessibleSymbol.parent;
159459
+ if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
159460
+ symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) };
159469
159461
  } else {
159470
- const printer = createPrinter({
159471
- removeComments: true,
159472
- module: compilerOptions.module,
159473
- target: compilerOptions.target,
159474
- omitTrailingSemicolon: true
159475
- });
159476
- const origin = {
159477
- kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) | 512 /* ComputedPropertyName */,
159478
- symbolName: printer.printNode(4 /* Unspecified */, node2, contextToken.getSourceFile())
159479
- };
159480
- symbolToOriginInfoMap[index] = origin;
159462
+ const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0;
159463
+ const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo(
159464
+ [{
159465
+ exportKind: 0 /* Named */,
159466
+ moduleFileName: fileName,
159467
+ isFromPackageJson: false,
159468
+ moduleSymbol,
159469
+ symbol: firstAccessibleSymbol,
159470
+ targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags
159471
+ }],
159472
+ position,
159473
+ isValidTypeOnlyAliasUseSite(location)
159474
+ ) || {};
159475
+ if (moduleSpecifier) {
159476
+ const origin = {
159477
+ kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */),
159478
+ moduleSymbol,
159479
+ isDefaultExport: false,
159480
+ symbolName: firstAccessibleSymbol.name,
159481
+ exportName: firstAccessibleSymbol.name,
159482
+ fileName,
159483
+ moduleSpecifier
159484
+ };
159485
+ symbolToOriginInfoMap[index] = origin;
159486
+ }
159481
159487
  }
159482
- } else {
159483
- const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0;
159484
- const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo(
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;
159488
+ } else if (preferences.includeCompletionsWithInsertText) {
159489
+ if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) {
159490
+ return;
159507
159491
  }
159492
+ addSymbolOriginInfo(symbol);
159493
+ addSymbolSortInfo(symbol);
159494
+ symbols.push(symbol);
159508
159495
  }
159509
- }
159510
- function addLiteralSymbol() {
159496
+ } else {
159511
159497
  addSymbolOriginInfo(symbol);
159512
159498
  addSymbolSortInfo(symbol);
159513
159499
  symbols.push(symbol);
159514
159500
  }
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
159501
  function addSymbolSortInfo(symbol2) {
159546
159502
  if (isStaticProperty(symbol2)) {
159547
159503
  symbolToSortTextMap[getSymbolId(symbol2)] = SortText.LocalDeclarationPriority;
@@ -160512,7 +160468,7 @@ function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, js
160512
160468
  return { name: JSON.stringify(name), needsConvertPropertyAccess: false };
160513
160469
  case 2 /* PropertyAccess */:
160514
160470
  case 1 /* Global */:
160515
- return name.charCodeAt(0) === 32 /* space */ ? void 0 : { name, needsConvertPropertyAccess: !originIsComputedPropertyName(origin) };
160471
+ return name.charCodeAt(0) === 32 /* space */ ? void 0 : { name, needsConvertPropertyAccess: true };
160516
160472
  case 5 /* None */:
160517
160473
  case 4 /* String */:
160518
160474
  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.20231031`;
38
+ version = `${versionMajorMinor}.0-insiders.20231102`;
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) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) {
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);
@@ -57483,20 +57478,33 @@ ${lanes.join("\n")}
57483
57478
  return emptyArray;
57484
57479
  }
57485
57480
  function getSignaturesOfType(type, kind) {
57486
- const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
57487
- if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) {
57481
+ function carveoutResult(type2, kind2) {
57482
+ if (kind2 === 0 /* Call */ && type2.flags & 1048576 /* Union */) {
57483
+ let memberName;
57484
+ if (everyType(type2, (t) => {
57485
+ var _a;
57486
+ return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
57487
+ })) {
57488
+ if (type2.arrayFallbackSignatures) {
57489
+ return type2.arrayFallbackSignatures;
57490
+ }
57491
+ const arrayArg = mapType(type2, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
57492
+ const arrayType = createArrayType(arrayArg, someType(type2, (t) => isReadonlyArraySymbol(t.symbol.parent)));
57493
+ return type2.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind2);
57494
+ }
57495
+ }
57496
+ return void 0;
57497
+ }
57498
+ let result = carveoutResult(type, kind);
57499
+ if (result)
57500
+ return result;
57501
+ if (kind === 0 /* Call */ && type.flags & 1048576 /* Union */) {
57488
57502
  if (type.arrayFallbackSignatures) {
57489
57503
  return type.arrayFallbackSignatures;
57490
57504
  }
57491
- let memberName;
57492
- if (everyType(type, (t) => {
57493
- var _a;
57494
- return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName);
57495
- })) {
57496
- const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper));
57497
- const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent)));
57498
- return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind);
57499
- }
57505
+ }
57506
+ result = getSignaturesOfStructuredType(getReducedApparentType(type), kind);
57507
+ if (kind === 0 /* Call */ && type.flags & 1048576 /* Union */) {
57500
57508
  type.arrayFallbackSignatures = result;
57501
57509
  }
57502
57510
  return result;
@@ -158655,109 +158663,57 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
158655
158663
  function addPropertySymbol(symbol, insertAwait, insertQuestionDot) {
158656
158664
  var _a;
158657
158665
  const computedPropertyName = firstDefined(symbol.declarations, (decl) => tryCast(getNameOfDeclaration(decl), isComputedPropertyName));
158658
- if (!computedPropertyName) {
158659
- addLiteralSymbol();
158660
- return;
158661
- }
158662
- const computedPropertyNameExpression = computedPropertyName.expression;
158663
- const name = isEntityName(computedPropertyNameExpression) ? computedPropertyNameExpression : isPropertyAccessExpression(computedPropertyNameExpression) ? computedPropertyNameExpression.name : void 0;
158664
- const nameSymbol = name && typeChecker.getSymbolAtLocation(name);
158665
- const nameSymbolId = nameSymbol && getSymbolId(nameSymbol);
158666
- if (!nameSymbolId) {
158667
- addLiteralSymbol();
158668
- return;
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;
158666
+ if (computedPropertyName) {
158667
+ const leftMostName = getLeftMostName(computedPropertyName.expression);
158668
+ const nameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName);
158669
+ const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker);
158670
+ const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol);
158671
+ if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) {
158672
+ const index = symbols.length;
158673
+ symbols.push(firstAccessibleSymbol);
158674
+ const moduleSymbol = firstAccessibleSymbol.parent;
158675
+ if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
158676
+ symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) };
158685
158677
  } else {
158686
- const printer = createPrinter({
158687
- removeComments: true,
158688
- module: compilerOptions.module,
158689
- target: compilerOptions.target,
158690
- omitTrailingSemicolon: true
158691
- });
158692
- const origin = {
158693
- kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) | 512 /* ComputedPropertyName */,
158694
- symbolName: printer.printNode(4 /* Unspecified */, node2, contextToken.getSourceFile())
158695
- };
158696
- symbolToOriginInfoMap[index] = origin;
158678
+ const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0;
158679
+ const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo(
158680
+ [{
158681
+ exportKind: 0 /* Named */,
158682
+ moduleFileName: fileName,
158683
+ isFromPackageJson: false,
158684
+ moduleSymbol,
158685
+ symbol: firstAccessibleSymbol,
158686
+ targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags
158687
+ }],
158688
+ position,
158689
+ isValidTypeOnlyAliasUseSite(location)
158690
+ ) || {};
158691
+ if (moduleSpecifier) {
158692
+ const origin = {
158693
+ kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */),
158694
+ moduleSymbol,
158695
+ isDefaultExport: false,
158696
+ symbolName: firstAccessibleSymbol.name,
158697
+ exportName: firstAccessibleSymbol.name,
158698
+ fileName,
158699
+ moduleSpecifier
158700
+ };
158701
+ symbolToOriginInfoMap[index] = origin;
158702
+ }
158697
158703
  }
158698
- } else {
158699
- const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0;
158700
- const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo(
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;
158704
+ } else if (preferences.includeCompletionsWithInsertText) {
158705
+ if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) {
158706
+ return;
158723
158707
  }
158708
+ addSymbolOriginInfo(symbol);
158709
+ addSymbolSortInfo(symbol);
158710
+ symbols.push(symbol);
158724
158711
  }
158725
- }
158726
- function addLiteralSymbol() {
158712
+ } else {
158727
158713
  addSymbolOriginInfo(symbol);
158728
158714
  addSymbolSortInfo(symbol);
158729
158715
  symbols.push(symbol);
158730
158716
  }
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
158717
  function addSymbolSortInfo(symbol2) {
158762
158718
  if (isStaticProperty(symbol2)) {
158763
158719
  symbolToSortTextMap[getSymbolId(symbol2)] = SortText.LocalDeclarationPriority;
@@ -159728,7 +159684,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
159728
159684
  return { name: JSON.stringify(name), needsConvertPropertyAccess: false };
159729
159685
  case 2 /* PropertyAccess */:
159730
159686
  case 1 /* Global */:
159731
- return name.charCodeAt(0) === 32 /* space */ ? void 0 : { name, needsConvertPropertyAccess: !originIsComputedPropertyName(origin) };
159687
+ return name.charCodeAt(0) === 32 /* space */ ? void 0 : { name, needsConvertPropertyAccess: true };
159732
159688
  case 5 /* None */:
159733
159689
  case 4 /* String */:
159734
159690
  return validNameResult;
@@ -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.20231031`;
57
+ var version = `${versionMajorMinor}.0-insiders.20231102`;
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) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) {
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-56220-2",
5
+ "version": "5.3.0-pr-56281-6",
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": "287d867e249a79c170a23b3b591b3ebcaae0613f"
118
+ "gitHead": "2c6942904d20f09d6e895e08d91f6f4b00026e94"
119
119
  }