typescript 4.8.0-dev.20220628 → 4.8.0-dev.20220629

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.8";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20220628";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20220629";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -61329,8 +61329,8 @@ var ts;
61329
61329
  var conditional = node.parent;
61330
61330
  return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional, contextFlags) : undefined;
61331
61331
  }
61332
- function getContextualTypeForChildJsxExpression(node, child) {
61333
- var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName);
61332
+ function getContextualTypeForChildJsxExpression(node, child, contextFlags) {
61333
+ var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName, contextFlags);
61334
61334
  var jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
61335
61335
  if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) {
61336
61336
  return undefined;
@@ -61347,24 +61347,24 @@ var ts;
61347
61347
  }
61348
61348
  }, true));
61349
61349
  }
61350
- function getContextualTypeForJsxExpression(node) {
61350
+ function getContextualTypeForJsxExpression(node, contextFlags) {
61351
61351
  var exprParent = node.parent;
61352
61352
  return ts.isJsxAttributeLike(exprParent)
61353
- ? getContextualType(node)
61353
+ ? getContextualType(node, contextFlags)
61354
61354
  : ts.isJsxElement(exprParent)
61355
- ? getContextualTypeForChildJsxExpression(exprParent, node)
61355
+ ? getContextualTypeForChildJsxExpression(exprParent, node, contextFlags)
61356
61356
  : undefined;
61357
61357
  }
61358
- function getContextualTypeForJsxAttribute(attribute) {
61358
+ function getContextualTypeForJsxAttribute(attribute, contextFlags) {
61359
61359
  if (ts.isJsxAttribute(attribute)) {
61360
- var attributesType = getApparentTypeOfContextualType(attribute.parent);
61360
+ var attributesType = getApparentTypeOfContextualType(attribute.parent, contextFlags);
61361
61361
  if (!attributesType || isTypeAny(attributesType)) {
61362
61362
  return undefined;
61363
61363
  }
61364
61364
  return getTypeOfPropertyOfContextualType(attributesType, attribute.name.escapedText);
61365
61365
  }
61366
61366
  else {
61367
- return getContextualType(attribute.parent);
61367
+ return getContextualType(attribute.parent, contextFlags);
61368
61368
  }
61369
61369
  }
61370
61370
  function isPossiblyDiscriminantValue(node) {
@@ -61488,10 +61488,10 @@ var ts;
61488
61488
  case 271:
61489
61489
  return tryGetTypeFromEffectiveTypeNode(parent);
61490
61490
  case 288:
61491
- return getContextualTypeForJsxExpression(parent);
61491
+ return getContextualTypeForJsxExpression(parent, contextFlags);
61492
61492
  case 285:
61493
61493
  case 287:
61494
- return getContextualTypeForJsxAttribute(parent);
61494
+ return getContextualTypeForJsxAttribute(parent, contextFlags);
61495
61495
  case 280:
61496
61496
  case 279:
61497
61497
  return getContextualJsxElementAttributesType(parent, contextFlags);
@@ -98803,7 +98803,7 @@ var ts;
98803
98803
  }
98804
98804
  }
98805
98805
  function processTypeReferenceDirective(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason) {
98806
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program", "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolveModuleNamesReusingOldState, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
98806
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program", "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
98807
98807
  processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason);
98808
98808
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
98809
98809
  }
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.20220628";
112
+ ts.version = ts.versionMajorMinor + ".0-dev.20220629";
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -73377,8 +73377,8 @@ var ts;
73377
73377
  var conditional = node.parent;
73378
73378
  return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional, contextFlags) : undefined;
73379
73379
  }
73380
- function getContextualTypeForChildJsxExpression(node, child) {
73381
- var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName);
73380
+ function getContextualTypeForChildJsxExpression(node, child, contextFlags) {
73381
+ var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName, contextFlags);
73382
73382
  // JSX expression is in children of JSX Element, we will look for an "children" attribute (we get the name from JSX.ElementAttributesProperty)
73383
73383
  var jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
73384
73384
  if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) {
@@ -73396,27 +73396,27 @@ var ts;
73396
73396
  }
73397
73397
  }, /*noReductions*/ true));
73398
73398
  }
73399
- function getContextualTypeForJsxExpression(node) {
73399
+ function getContextualTypeForJsxExpression(node, contextFlags) {
73400
73400
  var exprParent = node.parent;
73401
73401
  return ts.isJsxAttributeLike(exprParent)
73402
- ? getContextualType(node)
73402
+ ? getContextualType(node, contextFlags)
73403
73403
  : ts.isJsxElement(exprParent)
73404
- ? getContextualTypeForChildJsxExpression(exprParent, node)
73404
+ ? getContextualTypeForChildJsxExpression(exprParent, node, contextFlags)
73405
73405
  : undefined;
73406
73406
  }
73407
- function getContextualTypeForJsxAttribute(attribute) {
73407
+ function getContextualTypeForJsxAttribute(attribute, contextFlags) {
73408
73408
  // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type
73409
73409
  // which is a type of the parameter of the signature we are trying out.
73410
73410
  // If there is no contextual type (e.g. we are trying to resolve stateful component), get attributes type from resolving element's tagName
73411
73411
  if (ts.isJsxAttribute(attribute)) {
73412
- var attributesType = getApparentTypeOfContextualType(attribute.parent);
73412
+ var attributesType = getApparentTypeOfContextualType(attribute.parent, contextFlags);
73413
73413
  if (!attributesType || isTypeAny(attributesType)) {
73414
73414
  return undefined;
73415
73415
  }
73416
73416
  return getTypeOfPropertyOfContextualType(attributesType, attribute.name.escapedText);
73417
73417
  }
73418
73418
  else {
73419
- return getContextualType(attribute.parent);
73419
+ return getContextualType(attribute.parent, contextFlags);
73420
73420
  }
73421
73421
  }
73422
73422
  // Return true if the given expression is possibly a discriminant value. We limit the kinds of
@@ -73577,10 +73577,10 @@ var ts;
73577
73577
  case 271 /* ExportAssignment */:
73578
73578
  return tryGetTypeFromEffectiveTypeNode(parent);
73579
73579
  case 288 /* JsxExpression */:
73580
- return getContextualTypeForJsxExpression(parent);
73580
+ return getContextualTypeForJsxExpression(parent, contextFlags);
73581
73581
  case 285 /* JsxAttribute */:
73582
73582
  case 287 /* JsxSpreadAttribute */:
73583
- return getContextualTypeForJsxAttribute(parent);
73583
+ return getContextualTypeForJsxAttribute(parent, contextFlags);
73584
73584
  case 280 /* JsxOpeningElement */:
73585
73585
  case 279 /* JsxSelfClosingElement */:
73586
73586
  return getContextualJsxElementAttributesType(parent, contextFlags);
@@ -119437,7 +119437,7 @@ var ts;
119437
119437
  }
119438
119438
  }
119439
119439
  function processTypeReferenceDirective(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason) {
119440
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* Program */, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolveModuleNamesReusingOldState, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
119440
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* Program */, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
119441
119441
  processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason);
119442
119442
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
119443
119443
  }
@@ -303,7 +303,7 @@ var ts;
303
303
  // The following is baselined as a literal template type without intervention
304
304
  /** The version of the TypeScript compiler release */
305
305
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
306
- ts.version = ts.versionMajorMinor + ".0-dev.20220628";
306
+ ts.version = ts.versionMajorMinor + ".0-dev.20220629";
307
307
  /* @internal */
308
308
  var Comparison;
309
309
  (function (Comparison) {
@@ -73571,8 +73571,8 @@ var ts;
73571
73571
  var conditional = node.parent;
73572
73572
  return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional, contextFlags) : undefined;
73573
73573
  }
73574
- function getContextualTypeForChildJsxExpression(node, child) {
73575
- var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName);
73574
+ function getContextualTypeForChildJsxExpression(node, child, contextFlags) {
73575
+ var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName, contextFlags);
73576
73576
  // JSX expression is in children of JSX Element, we will look for an "children" attribute (we get the name from JSX.ElementAttributesProperty)
73577
73577
  var jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
73578
73578
  if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) {
@@ -73590,27 +73590,27 @@ var ts;
73590
73590
  }
73591
73591
  }, /*noReductions*/ true));
73592
73592
  }
73593
- function getContextualTypeForJsxExpression(node) {
73593
+ function getContextualTypeForJsxExpression(node, contextFlags) {
73594
73594
  var exprParent = node.parent;
73595
73595
  return ts.isJsxAttributeLike(exprParent)
73596
- ? getContextualType(node)
73596
+ ? getContextualType(node, contextFlags)
73597
73597
  : ts.isJsxElement(exprParent)
73598
- ? getContextualTypeForChildJsxExpression(exprParent, node)
73598
+ ? getContextualTypeForChildJsxExpression(exprParent, node, contextFlags)
73599
73599
  : undefined;
73600
73600
  }
73601
- function getContextualTypeForJsxAttribute(attribute) {
73601
+ function getContextualTypeForJsxAttribute(attribute, contextFlags) {
73602
73602
  // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type
73603
73603
  // which is a type of the parameter of the signature we are trying out.
73604
73604
  // If there is no contextual type (e.g. we are trying to resolve stateful component), get attributes type from resolving element's tagName
73605
73605
  if (ts.isJsxAttribute(attribute)) {
73606
- var attributesType = getApparentTypeOfContextualType(attribute.parent);
73606
+ var attributesType = getApparentTypeOfContextualType(attribute.parent, contextFlags);
73607
73607
  if (!attributesType || isTypeAny(attributesType)) {
73608
73608
  return undefined;
73609
73609
  }
73610
73610
  return getTypeOfPropertyOfContextualType(attributesType, attribute.name.escapedText);
73611
73611
  }
73612
73612
  else {
73613
- return getContextualType(attribute.parent);
73613
+ return getContextualType(attribute.parent, contextFlags);
73614
73614
  }
73615
73615
  }
73616
73616
  // Return true if the given expression is possibly a discriminant value. We limit the kinds of
@@ -73771,10 +73771,10 @@ var ts;
73771
73771
  case 271 /* ExportAssignment */:
73772
73772
  return tryGetTypeFromEffectiveTypeNode(parent);
73773
73773
  case 288 /* JsxExpression */:
73774
- return getContextualTypeForJsxExpression(parent);
73774
+ return getContextualTypeForJsxExpression(parent, contextFlags);
73775
73775
  case 285 /* JsxAttribute */:
73776
73776
  case 287 /* JsxSpreadAttribute */:
73777
- return getContextualTypeForJsxAttribute(parent);
73777
+ return getContextualTypeForJsxAttribute(parent, contextFlags);
73778
73778
  case 280 /* JsxOpeningElement */:
73779
73779
  case 279 /* JsxSelfClosingElement */:
73780
73780
  return getContextualJsxElementAttributesType(parent, contextFlags);
@@ -119631,7 +119631,7 @@ var ts;
119631
119631
  }
119632
119632
  }
119633
119633
  function processTypeReferenceDirective(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason) {
119634
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* Program */, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolveModuleNamesReusingOldState, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
119634
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* Program */, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
119635
119635
  processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason);
119636
119636
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
119637
119637
  }
package/lib/typescript.js CHANGED
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220628";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220629";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -73562,8 +73562,8 @@ var ts;
73562
73562
  var conditional = node.parent;
73563
73563
  return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional, contextFlags) : undefined;
73564
73564
  }
73565
- function getContextualTypeForChildJsxExpression(node, child) {
73566
- var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName);
73565
+ function getContextualTypeForChildJsxExpression(node, child, contextFlags) {
73566
+ var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName, contextFlags);
73567
73567
  // JSX expression is in children of JSX Element, we will look for an "children" attribute (we get the name from JSX.ElementAttributesProperty)
73568
73568
  var jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
73569
73569
  if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) {
@@ -73581,27 +73581,27 @@ var ts;
73581
73581
  }
73582
73582
  }, /*noReductions*/ true));
73583
73583
  }
73584
- function getContextualTypeForJsxExpression(node) {
73584
+ function getContextualTypeForJsxExpression(node, contextFlags) {
73585
73585
  var exprParent = node.parent;
73586
73586
  return ts.isJsxAttributeLike(exprParent)
73587
- ? getContextualType(node)
73587
+ ? getContextualType(node, contextFlags)
73588
73588
  : ts.isJsxElement(exprParent)
73589
- ? getContextualTypeForChildJsxExpression(exprParent, node)
73589
+ ? getContextualTypeForChildJsxExpression(exprParent, node, contextFlags)
73590
73590
  : undefined;
73591
73591
  }
73592
- function getContextualTypeForJsxAttribute(attribute) {
73592
+ function getContextualTypeForJsxAttribute(attribute, contextFlags) {
73593
73593
  // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type
73594
73594
  // which is a type of the parameter of the signature we are trying out.
73595
73595
  // If there is no contextual type (e.g. we are trying to resolve stateful component), get attributes type from resolving element's tagName
73596
73596
  if (ts.isJsxAttribute(attribute)) {
73597
- var attributesType = getApparentTypeOfContextualType(attribute.parent);
73597
+ var attributesType = getApparentTypeOfContextualType(attribute.parent, contextFlags);
73598
73598
  if (!attributesType || isTypeAny(attributesType)) {
73599
73599
  return undefined;
73600
73600
  }
73601
73601
  return getTypeOfPropertyOfContextualType(attributesType, attribute.name.escapedText);
73602
73602
  }
73603
73603
  else {
73604
- return getContextualType(attribute.parent);
73604
+ return getContextualType(attribute.parent, contextFlags);
73605
73605
  }
73606
73606
  }
73607
73607
  // Return true if the given expression is possibly a discriminant value. We limit the kinds of
@@ -73762,10 +73762,10 @@ var ts;
73762
73762
  case 271 /* ExportAssignment */:
73763
73763
  return tryGetTypeFromEffectiveTypeNode(parent);
73764
73764
  case 288 /* JsxExpression */:
73765
- return getContextualTypeForJsxExpression(parent);
73765
+ return getContextualTypeForJsxExpression(parent, contextFlags);
73766
73766
  case 285 /* JsxAttribute */:
73767
73767
  case 287 /* JsxSpreadAttribute */:
73768
- return getContextualTypeForJsxAttribute(parent);
73768
+ return getContextualTypeForJsxAttribute(parent, contextFlags);
73769
73769
  case 280 /* JsxOpeningElement */:
73770
73770
  case 279 /* JsxSelfClosingElement */:
73771
73771
  return getContextualJsxElementAttributesType(parent, contextFlags);
@@ -119622,7 +119622,7 @@ var ts;
119622
119622
  }
119623
119623
  }
119624
119624
  function processTypeReferenceDirective(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason) {
119625
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* Program */, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolveModuleNamesReusingOldState, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
119625
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* Program */, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
119626
119626
  processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason);
119627
119627
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
119628
119628
  }
@@ -294,7 +294,7 @@ var ts;
294
294
  // The following is baselined as a literal template type without intervention
295
295
  /** The version of the TypeScript compiler release */
296
296
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
297
- ts.version = ts.versionMajorMinor + ".0-dev.20220628";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20220629";
298
298
  /* @internal */
299
299
  var Comparison;
300
300
  (function (Comparison) {
@@ -73562,8 +73562,8 @@ var ts;
73562
73562
  var conditional = node.parent;
73563
73563
  return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional, contextFlags) : undefined;
73564
73564
  }
73565
- function getContextualTypeForChildJsxExpression(node, child) {
73566
- var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName);
73565
+ function getContextualTypeForChildJsxExpression(node, child, contextFlags) {
73566
+ var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName, contextFlags);
73567
73567
  // JSX expression is in children of JSX Element, we will look for an "children" attribute (we get the name from JSX.ElementAttributesProperty)
73568
73568
  var jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
73569
73569
  if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) {
@@ -73581,27 +73581,27 @@ var ts;
73581
73581
  }
73582
73582
  }, /*noReductions*/ true));
73583
73583
  }
73584
- function getContextualTypeForJsxExpression(node) {
73584
+ function getContextualTypeForJsxExpression(node, contextFlags) {
73585
73585
  var exprParent = node.parent;
73586
73586
  return ts.isJsxAttributeLike(exprParent)
73587
- ? getContextualType(node)
73587
+ ? getContextualType(node, contextFlags)
73588
73588
  : ts.isJsxElement(exprParent)
73589
- ? getContextualTypeForChildJsxExpression(exprParent, node)
73589
+ ? getContextualTypeForChildJsxExpression(exprParent, node, contextFlags)
73590
73590
  : undefined;
73591
73591
  }
73592
- function getContextualTypeForJsxAttribute(attribute) {
73592
+ function getContextualTypeForJsxAttribute(attribute, contextFlags) {
73593
73593
  // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type
73594
73594
  // which is a type of the parameter of the signature we are trying out.
73595
73595
  // If there is no contextual type (e.g. we are trying to resolve stateful component), get attributes type from resolving element's tagName
73596
73596
  if (ts.isJsxAttribute(attribute)) {
73597
- var attributesType = getApparentTypeOfContextualType(attribute.parent);
73597
+ var attributesType = getApparentTypeOfContextualType(attribute.parent, contextFlags);
73598
73598
  if (!attributesType || isTypeAny(attributesType)) {
73599
73599
  return undefined;
73600
73600
  }
73601
73601
  return getTypeOfPropertyOfContextualType(attributesType, attribute.name.escapedText);
73602
73602
  }
73603
73603
  else {
73604
- return getContextualType(attribute.parent);
73604
+ return getContextualType(attribute.parent, contextFlags);
73605
73605
  }
73606
73606
  }
73607
73607
  // Return true if the given expression is possibly a discriminant value. We limit the kinds of
@@ -73762,10 +73762,10 @@ var ts;
73762
73762
  case 271 /* ExportAssignment */:
73763
73763
  return tryGetTypeFromEffectiveTypeNode(parent);
73764
73764
  case 288 /* JsxExpression */:
73765
- return getContextualTypeForJsxExpression(parent);
73765
+ return getContextualTypeForJsxExpression(parent, contextFlags);
73766
73766
  case 285 /* JsxAttribute */:
73767
73767
  case 287 /* JsxSpreadAttribute */:
73768
- return getContextualTypeForJsxAttribute(parent);
73768
+ return getContextualTypeForJsxAttribute(parent, contextFlags);
73769
73769
  case 280 /* JsxOpeningElement */:
73770
73770
  case 279 /* JsxSelfClosingElement */:
73771
73771
  return getContextualJsxElementAttributesType(parent, contextFlags);
@@ -119622,7 +119622,7 @@ var ts;
119622
119622
  }
119623
119623
  }
119624
119624
  function processTypeReferenceDirective(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason) {
119625
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* Program */, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolveModuleNamesReusingOldState, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
119625
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* Program */, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
119626
119626
  processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason);
119627
119627
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
119628
119628
  }
@@ -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.20220628";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220629";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -73357,8 +73357,8 @@ var ts;
73357
73357
  var conditional = node.parent;
73358
73358
  return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional, contextFlags) : undefined;
73359
73359
  }
73360
- function getContextualTypeForChildJsxExpression(node, child) {
73361
- var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName);
73360
+ function getContextualTypeForChildJsxExpression(node, child, contextFlags) {
73361
+ var attributesType = getApparentTypeOfContextualType(node.openingElement.tagName, contextFlags);
73362
73362
  // JSX expression is in children of JSX Element, we will look for an "children" attribute (we get the name from JSX.ElementAttributesProperty)
73363
73363
  var jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
73364
73364
  if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) {
@@ -73376,27 +73376,27 @@ var ts;
73376
73376
  }
73377
73377
  }, /*noReductions*/ true));
73378
73378
  }
73379
- function getContextualTypeForJsxExpression(node) {
73379
+ function getContextualTypeForJsxExpression(node, contextFlags) {
73380
73380
  var exprParent = node.parent;
73381
73381
  return ts.isJsxAttributeLike(exprParent)
73382
- ? getContextualType(node)
73382
+ ? getContextualType(node, contextFlags)
73383
73383
  : ts.isJsxElement(exprParent)
73384
- ? getContextualTypeForChildJsxExpression(exprParent, node)
73384
+ ? getContextualTypeForChildJsxExpression(exprParent, node, contextFlags)
73385
73385
  : undefined;
73386
73386
  }
73387
- function getContextualTypeForJsxAttribute(attribute) {
73387
+ function getContextualTypeForJsxAttribute(attribute, contextFlags) {
73388
73388
  // When we trying to resolve JsxOpeningLikeElement as a stateless function element, we will already give its attributes a contextual type
73389
73389
  // which is a type of the parameter of the signature we are trying out.
73390
73390
  // If there is no contextual type (e.g. we are trying to resolve stateful component), get attributes type from resolving element's tagName
73391
73391
  if (ts.isJsxAttribute(attribute)) {
73392
- var attributesType = getApparentTypeOfContextualType(attribute.parent);
73392
+ var attributesType = getApparentTypeOfContextualType(attribute.parent, contextFlags);
73393
73393
  if (!attributesType || isTypeAny(attributesType)) {
73394
73394
  return undefined;
73395
73395
  }
73396
73396
  return getTypeOfPropertyOfContextualType(attributesType, attribute.name.escapedText);
73397
73397
  }
73398
73398
  else {
73399
- return getContextualType(attribute.parent);
73399
+ return getContextualType(attribute.parent, contextFlags);
73400
73400
  }
73401
73401
  }
73402
73402
  // Return true if the given expression is possibly a discriminant value. We limit the kinds of
@@ -73557,10 +73557,10 @@ var ts;
73557
73557
  case 271 /* ExportAssignment */:
73558
73558
  return tryGetTypeFromEffectiveTypeNode(parent);
73559
73559
  case 288 /* JsxExpression */:
73560
- return getContextualTypeForJsxExpression(parent);
73560
+ return getContextualTypeForJsxExpression(parent, contextFlags);
73561
73561
  case 285 /* JsxAttribute */:
73562
73562
  case 287 /* JsxSpreadAttribute */:
73563
- return getContextualTypeForJsxAttribute(parent);
73563
+ return getContextualTypeForJsxAttribute(parent, contextFlags);
73564
73564
  case 280 /* JsxOpeningElement */:
73565
73565
  case 279 /* JsxSelfClosingElement */:
73566
73566
  return getContextualJsxElementAttributesType(parent, contextFlags);
@@ -119417,7 +119417,7 @@ var ts;
119417
119417
  }
119418
119418
  }
119419
119419
  function processTypeReferenceDirective(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason) {
119420
- ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* Program */, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolveModuleNamesReusingOldState, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
119420
+ ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program" /* Program */, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : undefined });
119421
119421
  processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolvedTypeReferenceDirective, reason);
119422
119422
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
119423
119423
  }
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.8.0-dev.20220628",
5
+ "version": "4.8.0-dev.20220629",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [