Tidy up unused comments / code

This commit is contained in:
Ryan Cavanaugh 2016-01-11 13:35:33 -08:00
parent 3c715dd094
commit 4fe33732cf
2 changed files with 3 additions and 9 deletions

View File

@ -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(<SignatureDeclaration>node);
return bindFunctionOrConstructorType(<SignatureDeclaration>node);
case SyntaxKind.TypeLiteral:
case SyntaxKind.JSDocRecordType:
return bindAnonymousDeclaration(<TypeLiteralNode>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(<CallExpression>node);
}
break;

View File

@ -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 = <SignatureDeclaration>node.parent;
const signature = getSignatureFromDeclaration(signatureDeclaration);
const parameterIndex = ts.indexOf(signatureDeclaration.parameters, node);