Skip to content

Commit c3624c9

Browse files
author
unknown
committed
Addressing CR feedback.
1 parent a25d3c1 commit c3624c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6008,16 +6008,16 @@ module ts {
60086008
return symbol.flags & SymbolFlags.ValueModule && symbol.declarations.length === 1 && symbol.declarations[0].kind === SyntaxKind.SourceFile;
60096009
}
60106010

6011-
function isNodeParentedBy(node: Node, parent: Node): boolean {
6011+
function isNodeDescendentOf(node: Node, ancestor: Node): boolean {
60126012
while (node) {
6013-
if (node === parent) return true;
6013+
if (node === ancestor) return true;
60146014
node = node.parent;
60156015
}
60166016
return false;
60176017
}
60186018

60196019
function isUniqueLocalName(name: string, container: Node): boolean {
6020-
for (var node = container; isNodeParentedBy(node, container); node = node.nextContainer) {
6020+
for (var node = container; isNodeDescendentOf(node, container); node = node.nextContainer) {
60216021
if (node.locals && hasProperty(node.locals, name) && node.locals[name].flags & (SymbolFlags.Value | SymbolFlags.ExportValue)) {
60226022
return false;
60236023
}

0 commit comments

Comments
 (0)