mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Rename method.
This commit is contained in:
@@ -10190,7 +10190,7 @@ module ts {
|
||||
}
|
||||
|
||||
function getSymbolOfEntityNameOrPropertyAccessExpression(entityName: EntityName | PropertyAccessExpression): Symbol {
|
||||
if (isDeclarationOrCatchVariableName(entityName)) {
|
||||
if (isDeclarationName(entityName)) {
|
||||
return getSymbolOfNode(entityName.parent);
|
||||
}
|
||||
|
||||
@@ -10255,7 +10255,7 @@ module ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (isDeclarationOrCatchVariableName(node)) {
|
||||
if (isDeclarationName(node)) {
|
||||
// This is a declaration, call getSymbolOfNode
|
||||
return getSymbolOfNode(node.parent);
|
||||
}
|
||||
@@ -10351,7 +10351,7 @@ module ts {
|
||||
return getTypeOfSymbol(symbol);
|
||||
}
|
||||
|
||||
if (isDeclarationOrCatchVariableName(node)) {
|
||||
if (isDeclarationName(node)) {
|
||||
var symbol = getSymbolInfo(node);
|
||||
return symbol && getTypeOfSymbol(symbol);
|
||||
}
|
||||
|
||||
@@ -753,7 +753,7 @@ module ts {
|
||||
}
|
||||
|
||||
// True if the given identifier, string literal, or number literal is the name of a declaration node
|
||||
export function isDeclarationOrCatchVariableName(name: Node): boolean {
|
||||
export function isDeclarationName(name: Node): boolean {
|
||||
if (name.kind !== SyntaxKind.Identifier && name.kind !== SyntaxKind.StringLiteral && name.kind !== SyntaxKind.NumericLiteral) {
|
||||
return false;
|
||||
}
|
||||
@@ -769,10 +769,6 @@ module ts {
|
||||
return (<Declaration>parent).name === name;
|
||||
}
|
||||
|
||||
//if (parent.kind === SyntaxKind.CatchClause) {
|
||||
// return (<CatchClause>parent).name === name;
|
||||
//}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -4756,7 +4756,7 @@ module ts {
|
||||
|
||||
/** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */
|
||||
function isWriteAccess(node: Node): boolean {
|
||||
if (node.kind === SyntaxKind.Identifier && isDeclarationOrCatchVariableName(node)) {
|
||||
if (node.kind === SyntaxKind.Identifier && isDeclarationName(node)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4918,7 +4918,7 @@ module ts {
|
||||
else if (isInRightSideOfImport(node)) {
|
||||
return getMeaningFromRightHandSideOfImportEquals(node);
|
||||
}
|
||||
else if (isDeclarationOrCatchVariableName(node)) {
|
||||
else if (isDeclarationName(node)) {
|
||||
return getMeaningFromDeclaration(node.parent);
|
||||
}
|
||||
else if (isTypeReference(node)) {
|
||||
|
||||
Reference in New Issue
Block a user