Skip to content

Commit 731a20a

Browse files
committed
Revert "Cherry-pick PR microsoft#38653 into release-3.9 (microsoft#38687)"
This reverts commit 9ec5fc5.
1 parent c6f9343 commit 731a20a

File tree

5 files changed

+1
-158
lines changed

5 files changed

+1
-158
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22402,10 +22402,6 @@ namespace ts {
2240222402
}
2240322403
}
2240422404

22405-
function isCircularMappedProperty(symbol: Symbol) {
22406-
return !!(getCheckFlags(symbol) & CheckFlags.Mapped && !(<MappedSymbol>symbol).type && findResolutionCycleStartIndex(symbol, TypeSystemPropertyName.Type) >= 0);
22407-
}
22408-
2240922405
function getTypeOfPropertyOfContextualType(type: Type, name: __String) {
2241022406
return mapType(type, t => {
2241122407
if (isGenericMappedType(t)) {
@@ -22419,7 +22415,7 @@ namespace ts {
2241922415
else if (t.flags & TypeFlags.StructuredType) {
2242022416
const prop = getPropertyOfType(t, name);
2242122417
if (prop) {
22422-
return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
22418+
return getTypeOfSymbol(prop);
2242322419
}
2242422420
if (isTupleType(t)) {
2242522421
const restType = getRestTypeOfTupleType(t);

tests/baselines/reference/circularContextualMappedType.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

tests/baselines/reference/circularContextualMappedType.symbols

Lines changed: 0 additions & 51 deletions
This file was deleted.

tests/baselines/reference/circularContextualMappedType.types

Lines changed: 0 additions & 50 deletions
This file was deleted.

tests/cases/compiler/circularContextualMappedType.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)