@typescript-deploys/pr-build 5.4.0-pr-56911-7 → 5.4.0-pr-56907-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/tsc.js CHANGED
@@ -44254,19 +44254,6 @@ function createTypeChecker(host) {
44254
44254
  emptyArray
44255
44255
  );
44256
44256
  var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
44257
- var keyofConstraintObjectType = createAnonymousType(
44258
- /*symbol*/
44259
- void 0,
44260
- emptySymbols,
44261
- emptyArray,
44262
- emptyArray,
44263
- [stringType, numberType, esSymbolType].map((t) => createIndexInfo(
44264
- t,
44265
- unknownType,
44266
- /*isReadonly*/
44267
- false
44268
- ))
44269
- );
44270
44257
  var emptyGenericType = createAnonymousType(
44271
44258
  /*symbol*/
44272
44259
  void 0,
@@ -54543,13 +54530,17 @@ function createTypeChecker(host) {
54543
54530
  function replaceIndexedAccess(instantiable, type, replacement) {
54544
54531
  return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));
54545
54532
  }
54546
- function getReverseMappedTypeMembersLimitingConstraint(type) {
54533
+ function getLimitedConstraint(type) {
54547
54534
  const constraint = getConstraintTypeFromMappedType(type.mappedType);
54548
- if (constraint === type.constraintType) {
54535
+ if (!(constraint.flags & 1048576 /* Union */ || constraint.flags & 2097152 /* Intersection */)) {
54536
+ return;
54537
+ }
54538
+ const origin = constraint.flags & 1048576 /* Union */ ? constraint.origin : constraint;
54539
+ if (!origin || !(origin.flags & 2097152 /* Intersection */)) {
54549
54540
  return;
54550
54541
  }
54551
- const mapper = appendTypeMapping(type.mappedType.mapper, type.constraintType.type, keyofConstraintObjectType);
54552
- return getBaseConstraintOrType(instantiateType(constraint, mapper));
54542
+ const limitedConstraint = getIntersectionType(origin.types.filter((t) => t !== type.constraintType));
54543
+ return limitedConstraint !== neverType ? limitedConstraint : void 0;
54553
54544
  }
54554
54545
  function resolveReverseMappedTypeMembers(type) {
54555
54546
  const indexInfo = getIndexInfoOfType(type.source, stringType);
@@ -54558,11 +54549,11 @@ function createTypeChecker(host) {
54558
54549
  const optionalMask = modifiers & 4 /* IncludeOptional */ ? 0 : 16777216 /* Optional */;
54559
54550
  const indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType), readonlyMask && indexInfo.isReadonly)] : emptyArray;
54560
54551
  const members = createSymbolTable();
54561
- const membersLimitingConstraint = getReverseMappedTypeMembersLimitingConstraint(type);
54552
+ const limitedConstraint = getLimitedConstraint(type);
54562
54553
  for (const prop of getPropertiesOfType(type.source)) {
54563
- if (membersLimitingConstraint) {
54554
+ if (limitedConstraint) {
54564
54555
  const propertyNameType = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);
54565
- if (!isTypeAssignableTo(propertyNameType, membersLimitingConstraint)) {
54556
+ if (!isTypeAssignableTo(propertyNameType, limitedConstraint)) {
54566
54557
  continue;
54567
54558
  }
54568
54559
  }
@@ -55661,7 +55652,7 @@ function createTypeChecker(host) {
55661
55652
  let hasThisParameter = false;
55662
55653
  const iife = getImmediatelyInvokedFunctionExpression(declaration);
55663
55654
  const isJSConstructSignature = isJSDocConstructSignature(declaration);
55664
- const isUntypedSignatureInJSFile = !iife && isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && !getJSDocType(declaration);
55655
+ const isUntypedSignatureInJSFile = !iife && isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && !getJSDocType(declaration) && !getContextualSignatureForFunctionLikeDeclaration(declaration);
55665
55656
  if (isUntypedSignatureInJSFile) {
55666
55657
  flags |= 32 /* IsUntypedSignatureInJSFile */;
55667
55658
  }
@@ -64840,7 +64831,7 @@ function createTypeChecker(host) {
64840
64831
  }
64841
64832
  }
64842
64833
  function inferToMappedType(source, target, constraintType) {
64843
- if (constraintType.flags & 3145728 /* UnionOrIntersection */) {
64834
+ if (constraintType.flags & 1048576 /* Union */ || constraintType.flags & 2097152 /* Intersection */) {
64844
64835
  let result = false;
64845
64836
  for (const type of constraintType.types) {
64846
64837
  result = inferToMappedType(source, target, type) || result;
package/lib/tsserver.js CHANGED
@@ -48982,19 +48982,6 @@ function createTypeChecker(host) {
48982
48982
  emptyArray
48983
48983
  );
48984
48984
  var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
48985
- var keyofConstraintObjectType = createAnonymousType(
48986
- /*symbol*/
48987
- void 0,
48988
- emptySymbols,
48989
- emptyArray,
48990
- emptyArray,
48991
- [stringType, numberType, esSymbolType].map((t) => createIndexInfo(
48992
- t,
48993
- unknownType,
48994
- /*isReadonly*/
48995
- false
48996
- ))
48997
- );
48998
48985
  var emptyGenericType = createAnonymousType(
48999
48986
  /*symbol*/
49000
48987
  void 0,
@@ -59271,13 +59258,17 @@ function createTypeChecker(host) {
59271
59258
  function replaceIndexedAccess(instantiable, type, replacement) {
59272
59259
  return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));
59273
59260
  }
59274
- function getReverseMappedTypeMembersLimitingConstraint(type) {
59261
+ function getLimitedConstraint(type) {
59275
59262
  const constraint = getConstraintTypeFromMappedType(type.mappedType);
59276
- if (constraint === type.constraintType) {
59263
+ if (!(constraint.flags & 1048576 /* Union */ || constraint.flags & 2097152 /* Intersection */)) {
59264
+ return;
59265
+ }
59266
+ const origin = constraint.flags & 1048576 /* Union */ ? constraint.origin : constraint;
59267
+ if (!origin || !(origin.flags & 2097152 /* Intersection */)) {
59277
59268
  return;
59278
59269
  }
59279
- const mapper = appendTypeMapping(type.mappedType.mapper, type.constraintType.type, keyofConstraintObjectType);
59280
- return getBaseConstraintOrType(instantiateType(constraint, mapper));
59270
+ const limitedConstraint = getIntersectionType(origin.types.filter((t) => t !== type.constraintType));
59271
+ return limitedConstraint !== neverType ? limitedConstraint : void 0;
59281
59272
  }
59282
59273
  function resolveReverseMappedTypeMembers(type) {
59283
59274
  const indexInfo = getIndexInfoOfType(type.source, stringType);
@@ -59286,11 +59277,11 @@ function createTypeChecker(host) {
59286
59277
  const optionalMask = modifiers & 4 /* IncludeOptional */ ? 0 : 16777216 /* Optional */;
59287
59278
  const indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType), readonlyMask && indexInfo.isReadonly)] : emptyArray;
59288
59279
  const members = createSymbolTable();
59289
- const membersLimitingConstraint = getReverseMappedTypeMembersLimitingConstraint(type);
59280
+ const limitedConstraint = getLimitedConstraint(type);
59290
59281
  for (const prop of getPropertiesOfType(type.source)) {
59291
- if (membersLimitingConstraint) {
59282
+ if (limitedConstraint) {
59292
59283
  const propertyNameType = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);
59293
- if (!isTypeAssignableTo(propertyNameType, membersLimitingConstraint)) {
59284
+ if (!isTypeAssignableTo(propertyNameType, limitedConstraint)) {
59294
59285
  continue;
59295
59286
  }
59296
59287
  }
@@ -60389,7 +60380,7 @@ function createTypeChecker(host) {
60389
60380
  let hasThisParameter2 = false;
60390
60381
  const iife = getImmediatelyInvokedFunctionExpression(declaration);
60391
60382
  const isJSConstructSignature = isJSDocConstructSignature(declaration);
60392
- const isUntypedSignatureInJSFile = !iife && isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && !getJSDocType(declaration);
60383
+ const isUntypedSignatureInJSFile = !iife && isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && !getJSDocType(declaration) && !getContextualSignatureForFunctionLikeDeclaration(declaration);
60393
60384
  if (isUntypedSignatureInJSFile) {
60394
60385
  flags |= 32 /* IsUntypedSignatureInJSFile */;
60395
60386
  }
@@ -69568,7 +69559,7 @@ function createTypeChecker(host) {
69568
69559
  }
69569
69560
  }
69570
69561
  function inferToMappedType(source, target, constraintType) {
69571
- if (constraintType.flags & 3145728 /* UnionOrIntersection */) {
69562
+ if (constraintType.flags & 1048576 /* Union */ || constraintType.flags & 2097152 /* Intersection */) {
69572
69563
  let result = false;
69573
69564
  for (const type of constraintType.types) {
69574
69565
  result = inferToMappedType(source, target, type) || result;
package/lib/typescript.js CHANGED
@@ -46736,19 +46736,6 @@ ${lanes.join("\n")}
46736
46736
  emptyArray
46737
46737
  );
46738
46738
  var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
46739
- var keyofConstraintObjectType = createAnonymousType(
46740
- /*symbol*/
46741
- void 0,
46742
- emptySymbols,
46743
- emptyArray,
46744
- emptyArray,
46745
- [stringType, numberType, esSymbolType].map((t) => createIndexInfo(
46746
- t,
46747
- unknownType,
46748
- /*isReadonly*/
46749
- false
46750
- ))
46751
- );
46752
46739
  var emptyGenericType = createAnonymousType(
46753
46740
  /*symbol*/
46754
46741
  void 0,
@@ -57025,13 +57012,17 @@ ${lanes.join("\n")}
57025
57012
  function replaceIndexedAccess(instantiable, type, replacement) {
57026
57013
  return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));
57027
57014
  }
57028
- function getReverseMappedTypeMembersLimitingConstraint(type) {
57015
+ function getLimitedConstraint(type) {
57029
57016
  const constraint = getConstraintTypeFromMappedType(type.mappedType);
57030
- if (constraint === type.constraintType) {
57017
+ if (!(constraint.flags & 1048576 /* Union */ || constraint.flags & 2097152 /* Intersection */)) {
57018
+ return;
57019
+ }
57020
+ const origin = constraint.flags & 1048576 /* Union */ ? constraint.origin : constraint;
57021
+ if (!origin || !(origin.flags & 2097152 /* Intersection */)) {
57031
57022
  return;
57032
57023
  }
57033
- const mapper = appendTypeMapping(type.mappedType.mapper, type.constraintType.type, keyofConstraintObjectType);
57034
- return getBaseConstraintOrType(instantiateType(constraint, mapper));
57024
+ const limitedConstraint = getIntersectionType(origin.types.filter((t) => t !== type.constraintType));
57025
+ return limitedConstraint !== neverType ? limitedConstraint : void 0;
57035
57026
  }
57036
57027
  function resolveReverseMappedTypeMembers(type) {
57037
57028
  const indexInfo = getIndexInfoOfType(type.source, stringType);
@@ -57040,11 +57031,11 @@ ${lanes.join("\n")}
57040
57031
  const optionalMask = modifiers & 4 /* IncludeOptional */ ? 0 : 16777216 /* Optional */;
57041
57032
  const indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType), readonlyMask && indexInfo.isReadonly)] : emptyArray;
57042
57033
  const members = createSymbolTable();
57043
- const membersLimitingConstraint = getReverseMappedTypeMembersLimitingConstraint(type);
57034
+ const limitedConstraint = getLimitedConstraint(type);
57044
57035
  for (const prop of getPropertiesOfType(type.source)) {
57045
- if (membersLimitingConstraint) {
57036
+ if (limitedConstraint) {
57046
57037
  const propertyNameType = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */);
57047
- if (!isTypeAssignableTo(propertyNameType, membersLimitingConstraint)) {
57038
+ if (!isTypeAssignableTo(propertyNameType, limitedConstraint)) {
57048
57039
  continue;
57049
57040
  }
57050
57041
  }
@@ -58143,7 +58134,7 @@ ${lanes.join("\n")}
58143
58134
  let hasThisParameter2 = false;
58144
58135
  const iife = getImmediatelyInvokedFunctionExpression(declaration);
58145
58136
  const isJSConstructSignature = isJSDocConstructSignature(declaration);
58146
- const isUntypedSignatureInJSFile = !iife && isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && !getJSDocType(declaration);
58137
+ const isUntypedSignatureInJSFile = !iife && isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && !getJSDocType(declaration) && !getContextualSignatureForFunctionLikeDeclaration(declaration);
58147
58138
  if (isUntypedSignatureInJSFile) {
58148
58139
  flags |= 32 /* IsUntypedSignatureInJSFile */;
58149
58140
  }
@@ -67322,7 +67313,7 @@ ${lanes.join("\n")}
67322
67313
  }
67323
67314
  }
67324
67315
  function inferToMappedType(source, target, constraintType) {
67325
- if (constraintType.flags & 3145728 /* UnionOrIntersection */) {
67316
+ if (constraintType.flags & 1048576 /* Union */ || constraintType.flags & 2097152 /* Intersection */) {
67326
67317
  let result = false;
67327
67318
  for (const type of constraintType.types) {
67328
67319
  result = inferToMappedType(source, target, type) || result;
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.4.0-pr-56911-7",
5
+ "version": "5.4.0-pr-56907-6",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "20.1.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "3baf3b4e1804f2f32ace0d49b294bcf08f3ee314"
117
+ "gitHead": "7b4764f94bcf7c612b152c1231f62d5b2c8c983a"
118
118
  }