@typescript-deploys/pr-build 5.8.0-pr-52972-10 → 5.8.0-pr-57838-3

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
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.8";
21
- var version = `${versionMajorMinor}.0-insiders.20241127`;
21
+ var version = `${versionMajorMinor}.0-insiders.20241130`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -57342,20 +57342,12 @@ function createTypeChecker(host) {
57342
57342
  const indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType) || unknownType, readonlyMask && indexInfo.isReadonly)] : emptyArray;
57343
57343
  const members = createSymbolTable();
57344
57344
  const limitedConstraint = getLimitedConstraint(type);
57345
- const nameType = getNameTypeFromMappedType(type.mappedType);
57346
57345
  for (const prop of getPropertiesOfType(type.source)) {
57347
- if (limitedConstraint || nameType) {
57346
+ if (limitedConstraint) {
57348
57347
  const propertyNameType = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);
57349
- if (limitedConstraint && !isTypeAssignableTo(propertyNameType, limitedConstraint)) {
57348
+ if (!isTypeAssignableTo(propertyNameType, limitedConstraint)) {
57350
57349
  continue;
57351
57350
  }
57352
- if (nameType) {
57353
- const nameMapper = appendTypeMapping(type.mappedType.mapper, getTypeParameterFromMappedType(type.mappedType), propertyNameType);
57354
- const instantiatedNameType = instantiateType(nameType, nameMapper);
57355
- if (instantiatedNameType.flags & 131072 /* Never */) {
57356
- continue;
57357
- }
57358
- }
57359
57351
  }
57360
57352
  const checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0);
57361
57353
  const inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags);
@@ -64867,15 +64859,15 @@ function createTypeChecker(host) {
64867
64859
  }
64868
64860
  return result2;
64869
64861
  }
64870
- function getApparentMappedTypeKeys(nameType, targetType) {
64871
- const modifiersType = getApparentType(getModifiersTypeFromMappedType(targetType));
64862
+ function getApparentMappedTypeKeys(nameType, mappedType) {
64863
+ const modifiersType = getApparentType(getModifiersTypeFromMappedType(mappedType));
64872
64864
  const mappedKeys = [];
64873
64865
  forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(
64874
64866
  modifiersType,
64875
64867
  8576 /* StringOrNumberLiteralOrUnique */,
64876
64868
  /*stringsOnly*/
64877
64869
  false,
64878
- (t) => void mappedKeys.push(instantiateType(nameType, appendTypeMapping(targetType.mapper, getTypeParameterFromMappedType(targetType), t)))
64870
+ (t) => void mappedKeys.push(instantiateType(nameType, appendTypeMapping(mappedType.mapper, getTypeParameterFromMappedType(mappedType), t)))
64879
64871
  );
64880
64872
  return getUnionType(mappedKeys);
64881
64873
  }
@@ -65240,7 +65232,15 @@ function createTypeChecker(host) {
65240
65232
  if (isDeferredMappedIndex) {
65241
65233
  const mappedType = source2.type;
65242
65234
  const nameType = getNameTypeFromMappedType(mappedType);
65243
- const sourceMappedKeys = nameType && isMappedTypeWithKeyofConstraintDeclaration(mappedType) ? getApparentMappedTypeKeys(nameType, mappedType) : nameType || getConstraintTypeFromMappedType(mappedType);
65235
+ let sourceMappedKeys;
65236
+ if (nameType && isMappedTypeWithKeyofConstraintDeclaration(mappedType)) {
65237
+ sourceMappedKeys = getApparentMappedTypeKeys(nameType, mappedType);
65238
+ if (sourceMappedKeys.flags & 131072 /* Never */) {
65239
+ sourceMappedKeys = stringNumberSymbolType;
65240
+ }
65241
+ } else {
65242
+ sourceMappedKeys = nameType || getConstraintTypeFromMappedType(mappedType);
65243
+ }
65244
65244
  if (result2 = isRelatedTo(sourceMappedKeys, target2, 1 /* Source */, reportErrors2)) {
65245
65245
  return result2;
65246
65246
  }
@@ -67983,13 +67983,10 @@ function createTypeChecker(host) {
67983
67983
  if (isGenericMappedType(source) && isGenericMappedType(target)) {
67984
67984
  inferFromGenericMappedTypes(source, target);
67985
67985
  }
67986
- if (getObjectFlags(target) & 32 /* Mapped */) {
67987
- const mappedType = target;
67988
- if (getMappedTypeNameTypeKind(mappedType) !== 2 /* Remapping */) {
67989
- const constraintType = getConstraintTypeFromMappedType(mappedType);
67990
- if (inferToMappedType(source, mappedType, constraintType)) {
67991
- return;
67992
- }
67986
+ if (getObjectFlags(target) & 32 /* Mapped */ && !target.declaration.nameType) {
67987
+ const constraintType = getConstraintTypeFromMappedType(target);
67988
+ if (inferToMappedType(source, target, constraintType)) {
67989
+ return;
67993
67990
  }
67994
67991
  }
67995
67992
  if (!typesDefinitelyUnrelated(source, target)) {
package/lib/lib.es5.d.ts CHANGED
@@ -696,7 +696,7 @@ interface Math {
696
696
  */
697
697
  atan(x: number): number;
698
698
  /**
699
- * Returns the angle (in radians) from the X axis to a point.
699
+ * Returns the angle (in radians) between the X axis and the line going through both the origin and the given point.
700
700
  * @param y A numeric expression representing the cartesian y-coordinate.
701
701
  * @param x A numeric expression representing the cartesian x-coordinate.
702
702
  */
package/lib/typescript.js CHANGED
@@ -2278,7 +2278,7 @@ module.exports = __toCommonJS(typescript_exports);
2278
2278
 
2279
2279
  // src/compiler/corePublic.ts
2280
2280
  var versionMajorMinor = "5.8";
2281
- var version = `${versionMajorMinor}.0-insiders.20241127`;
2281
+ var version = `${versionMajorMinor}.0-insiders.20241130`;
2282
2282
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2283
2283
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2284
2284
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -61946,20 +61946,12 @@ function createTypeChecker(host) {
61946
61946
  const indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType) || unknownType, readonlyMask && indexInfo.isReadonly)] : emptyArray;
61947
61947
  const members = createSymbolTable();
61948
61948
  const limitedConstraint = getLimitedConstraint(type);
61949
- const nameType = getNameTypeFromMappedType(type.mappedType);
61950
61949
  for (const prop of getPropertiesOfType(type.source)) {
61951
- if (limitedConstraint || nameType) {
61950
+ if (limitedConstraint) {
61952
61951
  const propertyNameType = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);
61953
- if (limitedConstraint && !isTypeAssignableTo(propertyNameType, limitedConstraint)) {
61952
+ if (!isTypeAssignableTo(propertyNameType, limitedConstraint)) {
61954
61953
  continue;
61955
61954
  }
61956
- if (nameType) {
61957
- const nameMapper = appendTypeMapping(type.mappedType.mapper, getTypeParameterFromMappedType(type.mappedType), propertyNameType);
61958
- const instantiatedNameType = instantiateType(nameType, nameMapper);
61959
- if (instantiatedNameType.flags & 131072 /* Never */) {
61960
- continue;
61961
- }
61962
- }
61963
61955
  }
61964
61956
  const checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0);
61965
61957
  const inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags);
@@ -69471,15 +69463,15 @@ function createTypeChecker(host) {
69471
69463
  }
69472
69464
  return result2;
69473
69465
  }
69474
- function getApparentMappedTypeKeys(nameType, targetType) {
69475
- const modifiersType = getApparentType(getModifiersTypeFromMappedType(targetType));
69466
+ function getApparentMappedTypeKeys(nameType, mappedType) {
69467
+ const modifiersType = getApparentType(getModifiersTypeFromMappedType(mappedType));
69476
69468
  const mappedKeys = [];
69477
69469
  forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(
69478
69470
  modifiersType,
69479
69471
  8576 /* StringOrNumberLiteralOrUnique */,
69480
69472
  /*stringsOnly*/
69481
69473
  false,
69482
- (t) => void mappedKeys.push(instantiateType(nameType, appendTypeMapping(targetType.mapper, getTypeParameterFromMappedType(targetType), t)))
69474
+ (t) => void mappedKeys.push(instantiateType(nameType, appendTypeMapping(mappedType.mapper, getTypeParameterFromMappedType(mappedType), t)))
69483
69475
  );
69484
69476
  return getUnionType(mappedKeys);
69485
69477
  }
@@ -69844,7 +69836,15 @@ function createTypeChecker(host) {
69844
69836
  if (isDeferredMappedIndex) {
69845
69837
  const mappedType = source2.type;
69846
69838
  const nameType = getNameTypeFromMappedType(mappedType);
69847
- const sourceMappedKeys = nameType && isMappedTypeWithKeyofConstraintDeclaration(mappedType) ? getApparentMappedTypeKeys(nameType, mappedType) : nameType || getConstraintTypeFromMappedType(mappedType);
69839
+ let sourceMappedKeys;
69840
+ if (nameType && isMappedTypeWithKeyofConstraintDeclaration(mappedType)) {
69841
+ sourceMappedKeys = getApparentMappedTypeKeys(nameType, mappedType);
69842
+ if (sourceMappedKeys.flags & 131072 /* Never */) {
69843
+ sourceMappedKeys = stringNumberSymbolType;
69844
+ }
69845
+ } else {
69846
+ sourceMappedKeys = nameType || getConstraintTypeFromMappedType(mappedType);
69847
+ }
69848
69848
  if (result2 = isRelatedTo(sourceMappedKeys, target2, 1 /* Source */, reportErrors2)) {
69849
69849
  return result2;
69850
69850
  }
@@ -72587,13 +72587,10 @@ function createTypeChecker(host) {
72587
72587
  if (isGenericMappedType(source) && isGenericMappedType(target)) {
72588
72588
  inferFromGenericMappedTypes(source, target);
72589
72589
  }
72590
- if (getObjectFlags(target) & 32 /* Mapped */) {
72591
- const mappedType = target;
72592
- if (getMappedTypeNameTypeKind(mappedType) !== 2 /* Remapping */) {
72593
- const constraintType = getConstraintTypeFromMappedType(mappedType);
72594
- if (inferToMappedType(source, mappedType, constraintType)) {
72595
- return;
72596
- }
72590
+ if (getObjectFlags(target) & 32 /* Mapped */ && !target.declaration.nameType) {
72591
+ const constraintType = getConstraintTypeFromMappedType(target);
72592
+ if (inferToMappedType(source, target, constraintType)) {
72593
+ return;
72597
72594
  }
72598
72595
  }
72599
72596
  if (!typesDefinitelyUnrelated(source, target)) {
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.8.0-pr-52972-10",
5
+ "version": "5.8.0-pr-57838-3",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [