@@ -3617,7 +3617,7 @@ namespace ts {
3617
3617
});
3618
3618
}
3619
3619
3620
- function isDeclarationVisible(node: Node ): boolean {
3620
+ function isDeclarationVisible(node: Declaration ): boolean {
3621
3621
if (node) {
3622
3622
const links = getNodeLinks(node);
3623
3623
if (links.isVisible === undefined) {
@@ -3631,10 +3631,10 @@ namespace ts {
3631
3631
function determineIfDeclarationIsVisible() {
3632
3632
switch (node.kind) {
3633
3633
case SyntaxKind.BindingElement:
3634
- return isDeclarationVisible(node.parent.parent);
3634
+ return isDeclarationVisible(<Declaration> node.parent.parent);
3635
3635
case SyntaxKind.VariableDeclaration:
3636
- const declaration = node as VariableDeclaration;
3637
- if (isBindingPattern(declaration.name) && !declaration .name.elements.length) {
3636
+ if (isBindingPattern( node.name) &&
3637
+ !(<BindingPattern>node .name) .elements.length) {
3638
3638
// If the binding pattern is empty, this variable declaration is not visible
3639
3639
return false;
3640
3640
}
@@ -3657,7 +3657,7 @@ namespace ts {
3657
3657
return isGlobalSourceFile(parent);
3658
3658
}
3659
3659
// Exported members/ambient module elements (exception import declaration) are visible if parent is visible
3660
- return isDeclarationVisible(parent);
3660
+ return isDeclarationVisible(<Declaration> parent);
3661
3661
3662
3662
case SyntaxKind.PropertyDeclaration:
3663
3663
case SyntaxKind.PropertySignature:
@@ -3687,7 +3687,7 @@ namespace ts {
3687
3687
case SyntaxKind.UnionType:
3688
3688
case SyntaxKind.IntersectionType:
3689
3689
case SyntaxKind.ParenthesizedType:
3690
- return isDeclarationVisible(node.parent);
3690
+ return isDeclarationVisible(<Declaration> node.parent);
3691
3691
3692
3692
// Default binding, import specifier and namespace import is visible
3693
3693
// only on demand so by default it is not visible
@@ -6235,8 +6235,8 @@ namespace ts {
6235
6235
case SyntaxKind.MethodDeclaration:
6236
6236
case SyntaxKind.GetAccessor:
6237
6237
case SyntaxKind.SetAccessor:
6238
- return (<DeclarationBase >node).name.kind === SyntaxKind.ComputedPropertyName
6239
- && traverse((<DeclarationBase >node).name);
6238
+ return (<RealDeclaration >node).name.kind === SyntaxKind.ComputedPropertyName
6239
+ && traverse((<RealDeclaration >node).name);
6240
6240
6241
6241
default:
6242
6242
return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && forEachChild(node, traverse);
@@ -21832,7 +21832,7 @@ namespace ts {
21832
21832
function isTypeDeclarationName(name: Node): boolean {
21833
21833
return name.kind === SyntaxKind.Identifier &&
21834
21834
isTypeDeclaration(name.parent) &&
21835
- (<TypeElement >name.parent).name === name;
21835
+ (<RealDeclaration >name.parent).name === name;
21836
21836
}
21837
21837
21838
21838
function isTypeDeclaration(node: Node): boolean {
@@ -22460,7 +22460,7 @@ namespace ts {
22460
22460
22461
22461
// Return true if the given node is a declaration of a nested block scoped entity with a name that either hides an
22462
22462
// existing name or might hide a name when compiled downlevel
22463
- function isDeclarationWithCollidingName(node: Node ): boolean {
22463
+ function isDeclarationWithCollidingName(node: Declaration ): boolean {
22464
22464
node = getParseTreeNode(node, isDeclaration);
22465
22465
if (node) {
22466
22466
const symbol = getSymbolOfNode(node);
0 commit comments