Skip to content

Commit

Permalink
Revert "Cherry-pick PR microsoft#38653 into release-3.9 (microsoft#38687
Browse files Browse the repository at this point in the history
)"

This reverts commit 9ec5fc5.
  • Loading branch information
amcasey committed Jul 7, 2020
1 parent c6f9343 commit 731a20a
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 158 deletions.
6 changes: 1 addition & 5 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22402,10 +22402,6 @@ namespace ts {
}
}

function isCircularMappedProperty(symbol: Symbol) {
return !!(getCheckFlags(symbol) & CheckFlags.Mapped && !(<MappedSymbol>symbol).type && findResolutionCycleStartIndex(symbol, TypeSystemPropertyName.Type) >= 0);
}

function getTypeOfPropertyOfContextualType(type: Type, name: __String) {
return mapType(type, t => {
if (isGenericMappedType(t)) {
Expand All @@ -22419,7 +22415,7 @@ namespace ts {
else if (t.flags & TypeFlags.StructuredType) {
const prop = getPropertyOfType(t, name);
if (prop) {
return isCircularMappedProperty(prop) ? undefined : getTypeOfSymbol(prop);
return getTypeOfSymbol(prop);
}
if (isTupleType(t)) {
const restType = getRestTypeOfTupleType(t);
Expand Down
32 changes: 0 additions & 32 deletions tests/baselines/reference/circularContextualMappedType.js

This file was deleted.

51 changes: 0 additions & 51 deletions tests/baselines/reference/circularContextualMappedType.symbols

This file was deleted.

50 changes: 0 additions & 50 deletions tests/baselines/reference/circularContextualMappedType.types

This file was deleted.

20 changes: 0 additions & 20 deletions tests/cases/compiler/circularContextualMappedType.ts

This file was deleted.

0 comments on commit 731a20a

Please sign in to comment.