@@ -677,15 +677,20 @@ namespace ts {
677
677
return hasEffectiveModifier ( node , ModifierFlags . Private ) ? undefined : visitNodes ( params , visitDeclarationSubtree ) ;
678
678
}
679
679
680
- function isEnclosingDeclaration ( node : Node ) {
681
- return isSourceFile ( node )
682
- || isTypeAliasDeclaration ( node )
683
- || isModuleDeclaration ( node )
684
- || isClassDeclaration ( node )
685
- || isInterfaceDeclaration ( node )
686
- || isFunctionLike ( node )
687
- || isIndexSignatureDeclaration ( node )
688
- || isMappedTypeNode ( node ) ;
680
+ function isEnclosingDeclaration ( _node : Node ) {
681
+ // TODO(jakebailey): Clean this up. If we look at the way that the "types"
682
+ // baselines work, the enclosing declaration can be any node in the tree,
683
+ // so limiting what we use as enclosing declarations here is inconsistent
684
+ // and causes differences between .types and .d.ts baselines.
685
+ return true ;
686
+ // return isSourceFile(node)
687
+ // || isTypeAliasDeclaration(node)
688
+ // || isModuleDeclaration(node)
689
+ // || isClassDeclaration(node)
690
+ // || isInterfaceDeclaration(node)
691
+ // || isFunctionLike(node)
692
+ // || isIndexSignatureDeclaration(node)
693
+ // || isMappedTypeNode(node);
689
694
}
690
695
691
696
function checkEntityNameVisibility ( entityName : EntityNameOrEntityNameExpression , enclosingDeclaration : Node ) {
0 commit comments