diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 738c684f55..c43d1074df 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1575,12 +1575,12 @@ module ts { } // Container of resolvedExportSymbol is visible - return forEach(resolvedExportSymbol.declarations, (declaration: Node) => { - while (declaration) { - if (declaration === node) { + return forEach(resolvedExportSymbol.declarations, (current: Node) => { + while (current) { + if (current === node) { return true; } - declaration = declaration.parent; + current = current.parent; } }); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 81b96ed307..e97aaeb2ed 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -421,6 +421,7 @@ module ts { exprName: EntityName; } + // A TypeLiteral is the declaration node for an anonymous symbol. export interface TypeLiteralNode extends TypeNode, Declaration { members: NodeArray; } @@ -547,7 +548,8 @@ module ts { export interface ArrayLiteralExpression extends PrimaryExpression { elements: NodeArray; } - + + // An ObjectLiteralExpression is the declaration node for an anonymous symbol. export interface ObjectLiteralExpression extends PrimaryExpression, Declaration { properties: NodeArray; }