Fixing type check error in services.ts

This commit is contained in:
Anders Hejlsberg
2014-10-28 11:46:36 -07:00
parent 1fede10b6c
commit 35dc29df46

View File

@@ -4586,11 +4586,10 @@ module ts {
return root.parent.kind === SyntaxKind.TypeReference && !isLastClause;
}
function isInRightSideOfImport(node: EntityName) {
function isInRightSideOfImport(node: Node) {
while (node.parent.kind === SyntaxKind.QualifiedName) {
node = node.parent;
}
return node.parent.kind === SyntaxKind.ImportDeclaration && (<ImportDeclaration>node.parent).entityName === node;
}