File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -980,21 +980,23 @@ namespace ts {
980
980
* but returns undefined if that expression is not an EntityNameExpression.
981
981
*/
982
982
function climbToEntityNameOfExpressionWithTypeArguments(node: Node): EntityNameExpression | undefined {
983
- switch (node.kind) {
984
- case SyntaxKind.Identifier:
985
- case SyntaxKind.PropertyAccessExpression:
986
- if (node.parent) {
987
- node = node.parent;
988
- }
989
- else {
983
+ for (; ; ) {
984
+ switch (node.kind) {
985
+ case SyntaxKind.Identifier:
986
+ case SyntaxKind.PropertyAccessExpression:
987
+ if (node.parent) {
988
+ node = node.parent;
989
+ }
990
+ else {
991
+ return undefined;
992
+ }
993
+ break;
994
+ case SyntaxKind.ExpressionWithTypeArguments:
995
+ Debug.assert(isEntityNameExpression((<ExpressionWithTypeArguments>node).expression));
996
+ return <EntityNameExpression>(<ExpressionWithTypeArguments>node).expression;
997
+ default:
990
998
return undefined;
991
- }
992
- break;
993
- case SyntaxKind.ExpressionWithTypeArguments:
994
- Debug.assert(isEntityNameExpression((<ExpressionWithTypeArguments>node).expression));
995
- return <EntityNameExpression>(<ExpressionWithTypeArguments>node).expression;
996
- default:
997
- return undefined;
999
+ }
998
1000
}
999
1001
}
1000
1002
You can’t perform that action at this time.
0 commit comments