Skip to content

Commit 34cc427

Browse files
committed
Allow tuple expansions to an any rest to be considered an any signature as well
1 parent a2fcddc commit 34cc427

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
@@ -11734,7 +11734,7 @@ namespace ts {
1173411734
*/
1173511735
function isAnySignature(s: Signature) {
1173611736
return !s.typeParameters && (!s.thisParameter || isTypeAny(getTypeOfParameter(s.thisParameter))) && s.parameters.length === 1 &&
11737-
s.hasRestParameter && getTypeOfParameter(s.parameters[0]) === anyArrayType &&
11737+
s.hasRestParameter && (getTypeOfParameter(s.parameters[0]) === anyArrayType || isTypeAny(getTypeOfParameter(s.parameters[0]))) &&
1173811738
isTypeAny(getReturnTypeOfSignature(s));
1173911739
}
1174011740

0 commit comments

Comments
 (0)