File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -22469,6 +22469,10 @@ namespace ts {
22469
22469
}
22470
22470
}
22471
22471
22472
+ function isCircularMappedProperty(symbol: Symbol) {
22473
+ return !!(getCheckFlags(symbol) & CheckFlags.Mapped && !(<MappedSymbol>symbol).type && findResolutionCycleStartIndex(symbol, TypeSystemPropertyName.Type) >= 0);
22474
+ }
22475
+
22472
22476
function getTypeOfPropertyOfContextualType(type: Type, name: __String) {
22473
22477
return mapType(type, t => {
22474
22478
if (isGenericMappedType(t)) {
@@ -22482,7 +22486,7 @@ namespace ts {
22482
22486
else if (t.flags & TypeFlags.StructuredType) {
22483
22487
const prop = getPropertyOfType(t, name);
22484
22488
if (prop) {
22485
- return getTypeOfSymbol(prop);
22489
+ return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
22486
22490
}
22487
22491
if (isTupleType(t)) {
22488
22492
const restType = getRestTypeOfTupleType(t);
You can’t perform that action at this time.
0 commit comments