typescript 4.9.0-dev.20220812 → 4.9.0-dev.20220813

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
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.9";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220812";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220813";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -61514,25 +61514,7 @@ var ts;
61514
61514
  }
61515
61515
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
61516
61516
  return mapType(type, function (t) {
61517
- if (t.flags & 2097152) {
61518
- var intersection = t;
61519
- var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
61520
- if (newTypes.length > 0) {
61521
- return getIntersectionType(newTypes);
61522
- }
61523
- newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
61524
- if (newTypes.length > 0) {
61525
- return getIntersectionType(newTypes);
61526
- }
61527
- return undefined;
61528
- }
61529
- var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
61530
- if (concretePropertyType) {
61531
- return concretePropertyType;
61532
- }
61533
- return getTypeOfApplicableIndexInfoOfContextualType(t);
61534
- }, true);
61535
- function getTypeOfConcretePropertyOfContextualType(t) {
61517
+ var _a;
61536
61518
  if (isGenericMappedType(t) && !t.declaration.nameType) {
61537
61519
  var constraint = getConstraintTypeFromMappedType(t);
61538
61520
  var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -61540,9 +61522,8 @@ var ts;
61540
61522
  if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
61541
61523
  return substituteIndexedMappedType(t, propertyNameType);
61542
61524
  }
61543
- return undefined;
61544
61525
  }
61545
- if (t.flags & 3670016) {
61526
+ else if (t.flags & 3670016) {
61546
61527
  var prop = getPropertyOfType(t, name);
61547
61528
  if (prop) {
61548
61529
  return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
@@ -61553,16 +61534,10 @@ var ts;
61553
61534
  return restType;
61554
61535
  }
61555
61536
  }
61537
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
61556
61538
  }
61557
61539
  return undefined;
61558
- }
61559
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
61560
- var _a;
61561
- if (!(t.flags & 3670016)) {
61562
- return undefined;
61563
- }
61564
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
61565
- }
61540
+ }, true);
61566
61541
  }
61567
61542
  function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
61568
61543
  ts.Debug.assert(ts.isObjectLiteralMethod(node));
package/lib/tsserver.js CHANGED
@@ -109,7 +109,7 @@ var ts;
109
109
  // The following is baselined as a literal template type without intervention
110
110
  /** The version of the TypeScript compiler release */
111
111
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
112
- ts.version = ts.versionMajorMinor + ".0-dev.20220812";
112
+ ts.version = ts.versionMajorMinor + ".0-dev.20220813";
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -73570,25 +73570,7 @@ var ts;
73570
73570
  }
73571
73571
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
73572
73572
  return mapType(type, function (t) {
73573
- if (t.flags & 2097152 /* Intersection */) {
73574
- var intersection = t;
73575
- var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
73576
- if (newTypes.length > 0) {
73577
- return getIntersectionType(newTypes);
73578
- }
73579
- newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
73580
- if (newTypes.length > 0) {
73581
- return getIntersectionType(newTypes);
73582
- }
73583
- return undefined;
73584
- }
73585
- var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
73586
- if (concretePropertyType) {
73587
- return concretePropertyType;
73588
- }
73589
- return getTypeOfApplicableIndexInfoOfContextualType(t);
73590
- }, /*noReductions*/ true);
73591
- function getTypeOfConcretePropertyOfContextualType(t) {
73573
+ var _a;
73592
73574
  if (isGenericMappedType(t) && !t.declaration.nameType) {
73593
73575
  var constraint = getConstraintTypeFromMappedType(t);
73594
73576
  var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -73596,9 +73578,8 @@ var ts;
73596
73578
  if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
73597
73579
  return substituteIndexedMappedType(t, propertyNameType);
73598
73580
  }
73599
- return undefined;
73600
73581
  }
73601
- if (t.flags & 3670016 /* StructuredType */) {
73582
+ else if (t.flags & 3670016 /* StructuredType */) {
73602
73583
  var prop = getPropertyOfType(t, name);
73603
73584
  if (prop) {
73604
73585
  return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
@@ -73609,16 +73590,10 @@ var ts;
73609
73590
  return restType;
73610
73591
  }
73611
73592
  }
73593
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73612
73594
  }
73613
73595
  return undefined;
73614
- }
73615
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
73616
- var _a;
73617
- if (!(t.flags & 3670016 /* StructuredType */)) {
73618
- return undefined;
73619
- }
73620
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73621
- }
73596
+ }, /*noReductions*/ true);
73622
73597
  }
73623
73598
  // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
73624
73599
  // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
@@ -108,7 +108,7 @@ var ts;
108
108
  // The following is baselined as a literal template type without intervention
109
109
  /** The version of the TypeScript compiler release */
110
110
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
111
- ts.version = ts.versionMajorMinor + ".0-dev.20220812";
111
+ ts.version = ts.versionMajorMinor + ".0-dev.20220813";
112
112
  /* @internal */
113
113
  var Comparison;
114
114
  (function (Comparison) {
@@ -73569,25 +73569,7 @@ var ts;
73569
73569
  }
73570
73570
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
73571
73571
  return mapType(type, function (t) {
73572
- if (t.flags & 2097152 /* Intersection */) {
73573
- var intersection = t;
73574
- var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
73575
- if (newTypes.length > 0) {
73576
- return getIntersectionType(newTypes);
73577
- }
73578
- newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
73579
- if (newTypes.length > 0) {
73580
- return getIntersectionType(newTypes);
73581
- }
73582
- return undefined;
73583
- }
73584
- var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
73585
- if (concretePropertyType) {
73586
- return concretePropertyType;
73587
- }
73588
- return getTypeOfApplicableIndexInfoOfContextualType(t);
73589
- }, /*noReductions*/ true);
73590
- function getTypeOfConcretePropertyOfContextualType(t) {
73572
+ var _a;
73591
73573
  if (isGenericMappedType(t) && !t.declaration.nameType) {
73592
73574
  var constraint = getConstraintTypeFromMappedType(t);
73593
73575
  var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -73595,9 +73577,8 @@ var ts;
73595
73577
  if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
73596
73578
  return substituteIndexedMappedType(t, propertyNameType);
73597
73579
  }
73598
- return undefined;
73599
73580
  }
73600
- if (t.flags & 3670016 /* StructuredType */) {
73581
+ else if (t.flags & 3670016 /* StructuredType */) {
73601
73582
  var prop = getPropertyOfType(t, name);
73602
73583
  if (prop) {
73603
73584
  return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
@@ -73608,16 +73589,10 @@ var ts;
73608
73589
  return restType;
73609
73590
  }
73610
73591
  }
73592
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73611
73593
  }
73612
73594
  return undefined;
73613
- }
73614
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
73615
- var _a;
73616
- if (!(t.flags & 3670016 /* StructuredType */)) {
73617
- return undefined;
73618
- }
73619
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73620
- }
73595
+ }, /*noReductions*/ true);
73621
73596
  }
73622
73597
  // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
73623
73598
  // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
package/lib/typescript.js CHANGED
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = ts.versionMajorMinor + ".0-dev.20220812";
102
+ ts.version = ts.versionMajorMinor + ".0-dev.20220813";
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -73560,25 +73560,7 @@ var ts;
73560
73560
  }
73561
73561
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
73562
73562
  return mapType(type, function (t) {
73563
- if (t.flags & 2097152 /* Intersection */) {
73564
- var intersection = t;
73565
- var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
73566
- if (newTypes.length > 0) {
73567
- return getIntersectionType(newTypes);
73568
- }
73569
- newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
73570
- if (newTypes.length > 0) {
73571
- return getIntersectionType(newTypes);
73572
- }
73573
- return undefined;
73574
- }
73575
- var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
73576
- if (concretePropertyType) {
73577
- return concretePropertyType;
73578
- }
73579
- return getTypeOfApplicableIndexInfoOfContextualType(t);
73580
- }, /*noReductions*/ true);
73581
- function getTypeOfConcretePropertyOfContextualType(t) {
73563
+ var _a;
73582
73564
  if (isGenericMappedType(t) && !t.declaration.nameType) {
73583
73565
  var constraint = getConstraintTypeFromMappedType(t);
73584
73566
  var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -73586,9 +73568,8 @@ var ts;
73586
73568
  if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
73587
73569
  return substituteIndexedMappedType(t, propertyNameType);
73588
73570
  }
73589
- return undefined;
73590
73571
  }
73591
- if (t.flags & 3670016 /* StructuredType */) {
73572
+ else if (t.flags & 3670016 /* StructuredType */) {
73592
73573
  var prop = getPropertyOfType(t, name);
73593
73574
  if (prop) {
73594
73575
  return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
@@ -73599,16 +73580,10 @@ var ts;
73599
73580
  return restType;
73600
73581
  }
73601
73582
  }
73583
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73602
73584
  }
73603
73585
  return undefined;
73604
- }
73605
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
73606
- var _a;
73607
- if (!(t.flags & 3670016 /* StructuredType */)) {
73608
- return undefined;
73609
- }
73610
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73611
- }
73586
+ }, /*noReductions*/ true);
73612
73587
  }
73613
73588
  // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
73614
73589
  // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = ts.versionMajorMinor + ".0-dev.20220812";
102
+ ts.version = ts.versionMajorMinor + ".0-dev.20220813";
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -73560,25 +73560,7 @@ var ts;
73560
73560
  }
73561
73561
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
73562
73562
  return mapType(type, function (t) {
73563
- if (t.flags & 2097152 /* Intersection */) {
73564
- var intersection = t;
73565
- var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
73566
- if (newTypes.length > 0) {
73567
- return getIntersectionType(newTypes);
73568
- }
73569
- newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
73570
- if (newTypes.length > 0) {
73571
- return getIntersectionType(newTypes);
73572
- }
73573
- return undefined;
73574
- }
73575
- var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
73576
- if (concretePropertyType) {
73577
- return concretePropertyType;
73578
- }
73579
- return getTypeOfApplicableIndexInfoOfContextualType(t);
73580
- }, /*noReductions*/ true);
73581
- function getTypeOfConcretePropertyOfContextualType(t) {
73563
+ var _a;
73582
73564
  if (isGenericMappedType(t) && !t.declaration.nameType) {
73583
73565
  var constraint = getConstraintTypeFromMappedType(t);
73584
73566
  var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -73586,9 +73568,8 @@ var ts;
73586
73568
  if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
73587
73569
  return substituteIndexedMappedType(t, propertyNameType);
73588
73570
  }
73589
- return undefined;
73590
73571
  }
73591
- if (t.flags & 3670016 /* StructuredType */) {
73572
+ else if (t.flags & 3670016 /* StructuredType */) {
73592
73573
  var prop = getPropertyOfType(t, name);
73593
73574
  if (prop) {
73594
73575
  return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
@@ -73599,16 +73580,10 @@ var ts;
73599
73580
  return restType;
73600
73581
  }
73601
73582
  }
73583
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73602
73584
  }
73603
73585
  return undefined;
73604
- }
73605
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
73606
- var _a;
73607
- if (!(t.flags & 3670016 /* StructuredType */)) {
73608
- return undefined;
73609
- }
73610
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73611
- }
73586
+ }, /*noReductions*/ true);
73612
73587
  }
73613
73588
  // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
73614
73589
  // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20220812";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220813";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -73550,25 +73550,7 @@ var ts;
73550
73550
  }
73551
73551
  function getTypeOfPropertyOfContextualType(type, name, nameType) {
73552
73552
  return mapType(type, function (t) {
73553
- if (t.flags & 2097152 /* Intersection */) {
73554
- var intersection = t;
73555
- var newTypes = ts.mapDefined(intersection.types, getTypeOfConcretePropertyOfContextualType);
73556
- if (newTypes.length > 0) {
73557
- return getIntersectionType(newTypes);
73558
- }
73559
- newTypes = ts.mapDefined(intersection.types, getTypeOfApplicableIndexInfoOfContextualType);
73560
- if (newTypes.length > 0) {
73561
- return getIntersectionType(newTypes);
73562
- }
73563
- return undefined;
73564
- }
73565
- var concretePropertyType = getTypeOfConcretePropertyOfContextualType(t);
73566
- if (concretePropertyType) {
73567
- return concretePropertyType;
73568
- }
73569
- return getTypeOfApplicableIndexInfoOfContextualType(t);
73570
- }, /*noReductions*/ true);
73571
- function getTypeOfConcretePropertyOfContextualType(t) {
73553
+ var _a;
73572
73554
  if (isGenericMappedType(t) && !t.declaration.nameType) {
73573
73555
  var constraint = getConstraintTypeFromMappedType(t);
73574
73556
  var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
@@ -73576,9 +73558,8 @@ var ts;
73576
73558
  if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
73577
73559
  return substituteIndexedMappedType(t, propertyNameType);
73578
73560
  }
73579
- return undefined;
73580
73561
  }
73581
- if (t.flags & 3670016 /* StructuredType */) {
73562
+ else if (t.flags & 3670016 /* StructuredType */) {
73582
73563
  var prop = getPropertyOfType(t, name);
73583
73564
  if (prop) {
73584
73565
  return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
@@ -73589,16 +73570,10 @@ var ts;
73589
73570
  return restType;
73590
73571
  }
73591
73572
  }
73573
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73592
73574
  }
73593
73575
  return undefined;
73594
- }
73595
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
73596
- var _a;
73597
- if (!(t.flags & 3670016 /* StructuredType */)) {
73598
- return undefined;
73599
- }
73600
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
73601
- }
73576
+ }, /*noReductions*/ true);
73602
73577
  }
73603
73578
  // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of
73604
73579
  // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "4.9.0-dev.20220812",
5
+ "version": "4.9.0-dev.20220813",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [