Skip to content

Commit 8f07af9

Browse files
committed
Same rules for inferences made from signatures
1 parent a5e55ad commit 8f07af9

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
@@ -23925,7 +23925,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2392523925
callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i));
2392623926
}
2392723927
if (targetRestType) {
23928-
callback(getRestTypeAtPosition(source, paramCount, /*readonly*/ isConstTypeVariable(targetRestType)), targetRestType);
23928+
callback(getRestTypeAtPosition(source, paramCount, /*readonly*/ isConstTypeVariable(targetRestType) && !isMutableArrayOrTuple(getBaseConstraintOrType(targetRestType))), targetRestType);
2392923929
}
2393023930
}
2393123931

0 commit comments

Comments
 (0)