File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -10190,7 +10190,7 @@ module ts {
10190
10190
}
10191
10191
10192
10192
function getSymbolOfEntityNameOrPropertyAccessExpression(entityName: EntityName | PropertyAccessExpression): Symbol {
10193
- if (isDeclarationOrFunctionExpressionOrCatchVariableName (entityName)) {
10193
+ if (isDeclarationOrCatchVariableName (entityName)) {
10194
10194
return getSymbolOfNode(entityName.parent);
10195
10195
}
10196
10196
@@ -10255,7 +10255,7 @@ module ts {
10255
10255
return undefined;
10256
10256
}
10257
10257
10258
- if (isDeclarationOrFunctionExpressionOrCatchVariableName (node)) {
10258
+ if (isDeclarationOrCatchVariableName (node)) {
10259
10259
// This is a declaration, call getSymbolOfNode
10260
10260
return getSymbolOfNode(node.parent);
10261
10261
}
@@ -10351,7 +10351,7 @@ module ts {
10351
10351
return getTypeOfSymbol(symbol);
10352
10352
}
10353
10353
10354
- if (isDeclarationOrFunctionExpressionOrCatchVariableName (node)) {
10354
+ if (isDeclarationOrCatchVariableName (node)) {
10355
10355
var symbol = getSymbolInfo(node);
10356
10356
return symbol && getTypeOfSymbol(symbol);
10357
10357
}
Original file line number Diff line number Diff line change @@ -706,6 +706,7 @@ module ts {
706
706
case SyntaxKind . ImportSpecifier :
707
707
case SyntaxKind . NamespaceImport :
708
708
case SyntaxKind . ExportSpecifier :
709
+ case SyntaxKind . FunctionExpression :
709
710
return true ;
710
711
}
711
712
return false ;
@@ -739,7 +740,7 @@ module ts {
739
740
}
740
741
741
742
// True if the given identifier, string literal, or number literal is the name of a declaration node
742
- export function isDeclarationOrFunctionExpressionOrCatchVariableName ( name : Node ) : boolean {
743
+ export function isDeclarationOrCatchVariableName ( name : Node ) : boolean {
743
744
if ( name . kind !== SyntaxKind . Identifier && name . kind !== SyntaxKind . StringLiteral && name . kind !== SyntaxKind . NumericLiteral ) {
744
745
return false ;
745
746
}
@@ -751,7 +752,7 @@ module ts {
751
752
}
752
753
}
753
754
754
- if ( isDeclaration ( parent ) || parent . kind === SyntaxKind . FunctionExpression ) {
755
+ if ( isDeclaration ( parent ) ) {
755
756
return ( < Declaration > parent ) . name === name ;
756
757
}
757
758
Original file line number Diff line number Diff line change @@ -4756,7 +4756,7 @@ module ts {
4756
4756
4757
4757
/** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */
4758
4758
function isWriteAccess ( node : Node ) : boolean {
4759
- if ( node . kind === SyntaxKind . Identifier && isDeclarationOrFunctionExpressionOrCatchVariableName ( node ) ) {
4759
+ if ( node . kind === SyntaxKind . Identifier && isDeclarationOrCatchVariableName ( node ) ) {
4760
4760
return true ;
4761
4761
}
4762
4762
@@ -4918,7 +4918,7 @@ module ts {
4918
4918
else if ( isInRightSideOfImport ( node ) ) {
4919
4919
return getMeaningFromRightHandSideOfImportEquals ( node ) ;
4920
4920
}
4921
- else if ( isDeclarationOrFunctionExpressionOrCatchVariableName ( node ) ) {
4921
+ else if ( isDeclarationOrCatchVariableName ( node ) ) {
4922
4922
return getMeaningFromDeclaration ( node . parent ) ;
4923
4923
}
4924
4924
else if ( isTypeReference ( node ) ) {
You can’t perform that action at this time.
0 commit comments