Skip to content

Commit 90d868a

Browse files
committed
make never a non-array rest type
1 parent 7c14aff commit 90d868a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25632,7 +25632,7 @@ namespace ts {
2563225632

2563325633
function getNonArrayRestType(signature: Signature) {
2563425634
const restType = getEffectiveRestType(signature);
25635-
return restType && !isArrayType(restType) && !isTypeAny(restType) ? restType : undefined;
25635+
return restType && !isArrayType(restType) && !isTypeAny(restType) && (restType.flags & TypeFlags.Never) === 0 ? restType : undefined;
2563625636
}
2563725637

2563825638
function getTypeOfFirstParameterOfSignature(signature: Signature) {

0 commit comments

Comments
 (0)