File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -130,12 +130,14 @@ namespace ts {
130
130
symbol . members = { } ;
131
131
}
132
132
133
- if ( symbolFlags & SymbolFlags . Value &&
134
- ( ! symbol . valueDeclaration ||
135
- ( symbol . valueDeclaration . kind === SyntaxKind . ModuleDeclaration && node . kind !== SyntaxKind . ModuleDeclaration ) ) ) {
136
- // other kinds of value declarations take precedence over modules
137
- symbol . valueDeclaration = node ;
138
- }
133
+ if ( symbolFlags & SymbolFlags . Value ) {
134
+ const valueDeclaration = symbol . valueDeclaration ;
135
+ if ( ! valueDeclaration ||
136
+ ( valueDeclaration . kind !== node . kind && valueDeclaration . kind === SyntaxKind . ModuleDeclaration ) ) {
137
+ // other kinds of value declarations take precedence over modules
138
+ symbol . valueDeclaration = node ;
139
+ }
140
+ }
139
141
}
140
142
141
143
// Should not be called on a declaration with a computed property name,
You can’t perform that action at this time.
0 commit comments