From 4fe33732cf9639db3ae0fe039964f49590afd457 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 11 Jan 2016 13:35:33 -0800 Subject: [PATCH] Tidy up unused comments / code --- src/compiler/binder.ts | 6 ++---- src/compiler/checker.ts | 6 +----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 6b63cbdb5df..a9aed6a5221 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -888,7 +888,7 @@ namespace ts { } } - function bindFunctionOrConstructorTypeOrJSDocFunctionType(node: SignatureDeclaration): void { + function bindFunctionOrConstructorType(node: SignatureDeclaration): void { // For a given function symbol "<...>(...) => T" we want to generate a symbol identical // to the one we would get for: { <...>(...): T } // @@ -1274,7 +1274,7 @@ namespace ts { case SyntaxKind.FunctionType: case SyntaxKind.ConstructorType: case SyntaxKind.JSDocFunctionType: - return bindFunctionOrConstructorTypeOrJSDocFunctionType(node); + return bindFunctionOrConstructorType(node); case SyntaxKind.TypeLiteral: case SyntaxKind.JSDocRecordType: return bindAnonymousDeclaration(node, SymbolFlags.TypeLiteral, "__type"); @@ -1288,8 +1288,6 @@ namespace ts { case SyntaxKind.CallExpression: if (isInJavaScriptFile(node)) { - // We're only inspecting call expressions to detect CommonJS modules, so we can skip - // this check if we've already seen the module indicator bindCallExpression(node); } break; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6d7a9c5ffa7..229d66ec4fd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3924,7 +3924,7 @@ namespace ts { return result; } - function isOptionalParameter(node: ParameterDeclaration, skipSignatureCheck?: boolean) { + function isOptionalParameter(node: ParameterDeclaration) { if (node.parserContextFlags & ParserContextFlags.JavaScriptFile) { if (node.type && node.type.kind === SyntaxKind.JSDocOptionalType) { return true; @@ -3947,10 +3947,6 @@ namespace ts { } if (node.initializer) { - if (skipSignatureCheck) { - return true; - } - const signatureDeclaration = node.parent; const signature = getSignatureFromDeclaration(signatureDeclaration); const parameterIndex = ts.indexOf(signatureDeclaration.parameters, node);