mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 16:34:39 -06:00
Tidy up unused comments / code
This commit is contained in:
parent
3c715dd094
commit
4fe33732cf
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user