Skip to content

Commit 88677de

Browse files
authored
Do not omit the anyFunctionType from intersections (microsoft#35658)
* Do not omit the anyFunctionType from intersections * Move check into isEmptyResolvedType
1 parent d044e06 commit 88677de

File tree

5 files changed

+3514
-1
lines changed

5 files changed

+3514
-1
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14410,7 +14410,8 @@ namespace ts {
1441014410
}
1441114411

1441214412
function isEmptyResolvedType(t: ResolvedType) {
14413-
return t.properties.length === 0 &&
14413+
return t !== anyFunctionType &&
14414+
t.properties.length === 0 &&
1441414415
t.callSignatures.length === 0 &&
1441514416
t.constructSignatures.length === 0 &&
1441614417
!t.stringIndexInfo &&

0 commit comments

Comments
 (0)