Skip to content

Commit 05faf83

Browse files
author
Benjamin Tong
committed
update code according to suggested changes
1 parent cff2f13 commit 05faf83

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21455,7 +21455,6 @@ namespace ts {
2145521455
* with no call or construct signatures.
2145621456
*/
2145721457
function isObjectTypeWithInferableIndex(type: Type): boolean {
21458-
const objectFlags = getObjectFlags(type);
2145921458
return type.flags & TypeFlags.Intersection
2146021459
? every((type as IntersectionType).types, isObjectTypeWithInferableIndex)
2146121460
: !!(
@@ -21464,8 +21463,7 @@ namespace ts {
2146421463
&& !(type.symbol.flags & SymbolFlags.Class)
2146521464
&& !typeHasCallOrConstructSignatures(type)
2146621465
) || !!(
21467-
objectFlags
21468-
&& objectFlags & ObjectFlags.ObjectRestType
21466+
getObjectFlags(type) & ObjectFlags.ObjectRestType
2146921467
) || !!(getObjectFlags(type) & ObjectFlags.ReverseMapped && isObjectTypeWithInferableIndex((type as ReverseMappedType).source));
2147021468
}
2147121469

0 commit comments

Comments
 (0)