@typescript-deploys/pr-build 5.3.0-pr-55727-2 → 5.3.0-pr-55727-5

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 CHANGED
@@ -53489,13 +53489,14 @@ function createTypeChecker(host) {
53489
53489
  const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
53490
53490
  const paramSymbol = createSymbol(
53491
53491
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
53492
- paramName || `arg${i}`
53492
+ paramName || `arg${i}`,
53493
+ isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
53493
53494
  );
53494
53495
  paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
53495
53496
  params[i] = paramSymbol;
53496
53497
  }
53497
53498
  if (needsExtraRestElement) {
53498
- const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
53499
+ const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
53499
53500
  restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
53500
53501
  if (shorter === right) {
53501
53502
  restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
@@ -64445,7 +64446,7 @@ function createTypeChecker(host) {
64445
64446
  function hasMatchingArgument(expression, reference) {
64446
64447
  if (expression.arguments) {
64447
64448
  for (const argument of expression.arguments) {
64448
- if (isOrContainsMatchingReference(reference, argument)) {
64449
+ if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {
64449
64450
  return true;
64450
64451
  }
64451
64452
  }
@@ -66085,7 +66086,7 @@ function createTypeChecker(host) {
66085
66086
  false
66086
66087
  );
66087
66088
  }
66088
- if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */)) {
66089
+ if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {
66089
66090
  type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
66090
66091
  }
66091
66092
  const access = getDiscriminantPropertyAccess(predicateArgument, type);
package/lib/tsserver.js CHANGED
@@ -58191,13 +58191,14 @@ function createTypeChecker(host) {
58191
58191
  const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
58192
58192
  const paramSymbol = createSymbol(
58193
58193
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
58194
- paramName || `arg${i}`
58194
+ paramName || `arg${i}`,
58195
+ isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
58195
58196
  );
58196
58197
  paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
58197
58198
  params[i] = paramSymbol;
58198
58199
  }
58199
58200
  if (needsExtraRestElement) {
58200
- const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
58201
+ const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
58201
58202
  restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
58202
58203
  if (shorter === right) {
58203
58204
  restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
@@ -69147,7 +69148,7 @@ function createTypeChecker(host) {
69147
69148
  function hasMatchingArgument(expression, reference) {
69148
69149
  if (expression.arguments) {
69149
69150
  for (const argument of expression.arguments) {
69150
- if (isOrContainsMatchingReference(reference, argument)) {
69151
+ if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {
69151
69152
  return true;
69152
69153
  }
69153
69154
  }
@@ -70787,7 +70788,7 @@ function createTypeChecker(host) {
70787
70788
  false
70788
70789
  );
70789
70790
  }
70790
- if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */)) {
70791
+ if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {
70791
70792
  type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
70792
70793
  }
70793
70794
  const access = getDiscriminantPropertyAccess(predicateArgument, type);
@@ -133323,7 +133324,7 @@ function createCacheableExportInfoMap(host) {
133323
133324
  }
133324
133325
  };
133325
133326
  if (Debug.isDebugging) {
133326
- Object.defineProperty(cache, "__cache", { get: () => exportInfo });
133327
+ Object.defineProperty(cache, "__cache", { value: exportInfo });
133327
133328
  }
133328
133329
  return cache;
133329
133330
  function rehydrateCachedInfo(info) {
@@ -133361,11 +133362,15 @@ function createCacheableExportInfoMap(host) {
133361
133362
  }
133362
133363
  function key(importedName, symbol, ambientModuleName, checker) {
133363
133364
  const moduleKey = ambientModuleName || "";
133364
- return `${importedName}|${getSymbolId(skipAlias(symbol, checker))}|${moduleKey}`;
133365
+ return `${importedName.length} ${getSymbolId(skipAlias(symbol, checker))} ${importedName} ${moduleKey}`;
133365
133366
  }
133366
133367
  function parseKey(key2) {
133367
- const symbolName2 = key2.substring(0, key2.indexOf("|"));
133368
- const moduleKey = key2.substring(key2.lastIndexOf("|") + 1);
133368
+ const firstSpace = key2.indexOf(" ");
133369
+ const secondSpace = key2.indexOf(" ", firstSpace + 1);
133370
+ const symbolNameLength = parseInt(key2.substring(0, firstSpace), 10);
133371
+ const data = key2.substring(secondSpace + 1);
133372
+ const symbolName2 = data.substring(0, symbolNameLength);
133373
+ const moduleKey = data.substring(symbolNameLength + 1);
133369
133374
  const ambientModuleName = moduleKey === "" ? void 0 : moduleKey;
133370
133375
  return { symbolName: symbolName2, ambientModuleName };
133371
133376
  }
@@ -11040,7 +11040,7 @@ declare namespace ts {
11040
11040
  * in the case of InternalSymbolName.ExportEquals and InternalSymbolName.Default.
11041
11041
  */
11042
11042
  exportName: string;
11043
- exportMapKey?: string;
11043
+ exportMapKey?: ExportMapInfoKey;
11044
11044
  moduleSpecifier?: string;
11045
11045
  /** The file name declaring the export's module symbol, if it was an external module */
11046
11046
  fileName?: string;
@@ -11050,7 +11050,7 @@ declare namespace ts {
11050
11050
  isPackageJsonImport?: true;
11051
11051
  }
11052
11052
  interface CompletionEntryDataUnresolved extends CompletionEntryDataAutoImport {
11053
- exportMapKey: string;
11053
+ exportMapKey: ExportMapInfoKey;
11054
11054
  }
11055
11055
  interface CompletionEntryDataResolved extends CompletionEntryDataAutoImport {
11056
11056
  moduleSpecifier: string;
@@ -11365,6 +11365,9 @@ declare namespace ts {
11365
11365
  span: TextSpan;
11366
11366
  preferences: UserPreferences;
11367
11367
  }
11368
+ type ExportMapInfoKey = string & {
11369
+ __exportInfoKey: void;
11370
+ };
11368
11371
  /** The classifier is used for syntactic highlighting in editors via the TSServer */
11369
11372
  function createClassifier(): Classifier;
11370
11373
  interface DocumentHighlights {
package/lib/typescript.js CHANGED
@@ -55958,13 +55958,14 @@ ${lanes.join("\n")}
55958
55958
  const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
55959
55959
  const paramSymbol = createSymbol(
55960
55960
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
55961
- paramName || `arg${i}`
55961
+ paramName || `arg${i}`,
55962
+ isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
55962
55963
  );
55963
55964
  paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
55964
55965
  params[i] = paramSymbol;
55965
55966
  }
55966
55967
  if (needsExtraRestElement) {
55967
- const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
55968
+ const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
55968
55969
  restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
55969
55970
  if (shorter === right) {
55970
55971
  restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
@@ -66914,7 +66915,7 @@ ${lanes.join("\n")}
66914
66915
  function hasMatchingArgument(expression, reference) {
66915
66916
  if (expression.arguments) {
66916
66917
  for (const argument of expression.arguments) {
66917
- if (isOrContainsMatchingReference(reference, argument)) {
66918
+ if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {
66918
66919
  return true;
66919
66920
  }
66920
66921
  }
@@ -68554,7 +68555,7 @@ ${lanes.join("\n")}
68554
68555
  false
68555
68556
  );
68556
68557
  }
68557
- if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */)) {
68558
+ if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {
68558
68559
  type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
68559
68560
  }
68560
68561
  const access = getDiscriminantPropertyAccess(predicateArgument, type);
@@ -131624,7 +131625,7 @@ ${lanes.join("\n")}
131624
131625
  }
131625
131626
  };
131626
131627
  if (Debug.isDebugging) {
131627
- Object.defineProperty(cache, "__cache", { get: () => exportInfo });
131628
+ Object.defineProperty(cache, "__cache", { value: exportInfo });
131628
131629
  }
131629
131630
  return cache;
131630
131631
  function rehydrateCachedInfo(info) {
@@ -131662,11 +131663,15 @@ ${lanes.join("\n")}
131662
131663
  }
131663
131664
  function key(importedName, symbol, ambientModuleName, checker) {
131664
131665
  const moduleKey = ambientModuleName || "";
131665
- return `${importedName}|${getSymbolId(skipAlias(symbol, checker))}|${moduleKey}`;
131666
+ return `${importedName.length} ${getSymbolId(skipAlias(symbol, checker))} ${importedName} ${moduleKey}`;
131666
131667
  }
131667
131668
  function parseKey(key2) {
131668
- const symbolName2 = key2.substring(0, key2.indexOf("|"));
131669
- const moduleKey = key2.substring(key2.lastIndexOf("|") + 1);
131669
+ const firstSpace = key2.indexOf(" ");
131670
+ const secondSpace = key2.indexOf(" ", firstSpace + 1);
131671
+ const symbolNameLength = parseInt(key2.substring(0, firstSpace), 10);
131672
+ const data = key2.substring(secondSpace + 1);
131673
+ const symbolName2 = data.substring(0, symbolNameLength);
131674
+ const moduleKey = data.substring(symbolNameLength + 1);
131670
131675
  const ambientModuleName = moduleKey === "" ? void 0 : moduleKey;
131671
131676
  return { symbolName: symbolName2, ambientModuleName };
131672
131677
  }
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-55727-2",
5
+ "version": "5.3.0-pr-55727-5",
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": "93ec2799df89a9621eb6cc3c4bf2367d6b6c0436"
116
+ "gitHead": "0166f0aec71c4c4395daae79d37217259c5952fd"
117
117
  }