From 4a7de63c83bef54ec35922cc0a01386365c777c5 Mon Sep 17 00:00:00 2001 From: Gabriela Araujo Britto Date: Tue, 15 Feb 2022 11:45:58 -0800 Subject: [PATCH] undo unnecessary changes --- src/compiler/checker.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 59d1e28db88..78854ac51da 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -26061,14 +26061,12 @@ namespace ts { links.resolvedSignature = cached; return type; } - const contextualSignature = getContextualSignature(func); if (contextualSignature) { - const signature = contextualSignature; const index = func.parameters.indexOf(parameter) - (getThisParameter(func) ? 1 : 0); return parameter.dotDotDotToken && lastOrUndefined(func.parameters) === parameter ? - getRestTypeAtPosition(signature, index) : - tryGetTypeAtPosition(signature, index); + getRestTypeAtPosition(contextualSignature, index) : + tryGetTypeAtPosition(contextualSignature, index); } }