From efbacb97c9d57a449a45da2110b550303e0a0398 Mon Sep 17 00:00:00 2001 From: mihailik Date: Mon, 9 Nov 2015 09:45:57 +0000 Subject: [PATCH] Use ts.indexOf instead of Array.prototype.indexOf (keep consistent with the rest of codebase, and thus enable ES3-compatibility of tsc and services) --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 706ed1c65a3..c4a60cd3355 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3731,7 +3731,7 @@ namespace ts { if (node.initializer) { const signatureDeclaration = node.parent; const signature = getSignatureFromDeclaration(signatureDeclaration); - const parameterIndex = signatureDeclaration.parameters.indexOf(node); + const parameterIndex = ts.indexOf(signatureDeclaration.parameters, node); Debug.assert(parameterIndex >= 0); return parameterIndex >= signature.minArgumentCount; }