@@ -74,7 +74,7 @@ export default util.createRule({
7474 }
7575
7676 function qualifierIsUnnecessary (
77- qualifier : TSESTree . Node ,
77+ qualifier : TSESTree . EntityName | TSESTree . MemberExpression ,
7878 name : TSESTree . Identifier ,
7979 ) : boolean {
8080 const tsQualifier = esTreeNodeToTSNodeMap . get ( qualifier ) ;
@@ -110,7 +110,7 @@ export default util.createRule({
110110
111111 function visitNamespaceAccess (
112112 node : TSESTree . Node ,
113- qualifier : TSESTree . Node ,
113+ qualifier : TSESTree . EntityName | TSESTree . MemberExpression ,
114114 name : TSESTree . Identifier ,
115115 ) : void {
116116 // Only look for nested qualifier errors if we didn't already fail on the outer qualifier.
@@ -132,7 +132,12 @@ export default util.createRule({
132132 }
133133 }
134134
135- function enterDeclaration ( node : TSESTree . Node ) : void {
135+ function enterDeclaration (
136+ node :
137+ | TSESTree . TSModuleDeclaration
138+ | TSESTree . TSEnumDeclaration
139+ | TSESTree . ExportNamedDeclaration ,
140+ ) : void {
136141 namespacesInScope . push ( esTreeNodeToTSNodeMap . get ( node ) ) ;
137142 }
138143
@@ -152,7 +157,9 @@ export default util.createRule({
152157 return node . type === AST_NODE_TYPES . MemberExpression && ! node . computed ;
153158 }
154159
155- function isEntityNameExpression ( node : TSESTree . Node ) : boolean {
160+ function isEntityNameExpression (
161+ node : TSESTree . Node ,
162+ ) : node is TSESTree . Identifier | TSESTree . MemberExpression {
156163 return (
157164 node . type === AST_NODE_TYPES . Identifier ||
158165 ( isPropertyAccessExpression ( node ) &&
0 commit comments