mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-23 07:07:09 -05:00
Fixed an issue with top function type being callable with no arguments (#52387)
This commit is contained in:
committed by
GitHub
parent
6b75ce23ce
commit
02885b1a2e
@@ -34609,7 +34609,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
|
||||
function getNonArrayRestType(signature: Signature) {
|
||||
const restType = getEffectiveRestType(signature);
|
||||
return restType && !isArrayType(restType) && !isTypeAny(restType) && (getReducedType(restType).flags & TypeFlags.Never) === 0 ? restType : undefined;
|
||||
return restType && !isArrayType(restType) && !isTypeAny(restType) ? restType : undefined;
|
||||
}
|
||||
|
||||
function getTypeOfFirstParameterOfSignature(signature: Signature) {
|
||||
|
||||
Reference in New Issue
Block a user