Skip to content

Commit 2e0c390

Browse files
author
Yui T
committed
Address code review
1 parent 3079607 commit 2e0c390

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/services.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3619,7 +3619,7 @@ namespace ts {
36193619
function getSymbolKind(symbol: Symbol, location: Node): string {
36203620
let flags = symbol.getFlags();
36213621

3622-
if (flags & SymbolFlags.Class) return symbol.declarations[0].kind === SyntaxKind.ClassExpression ?
3622+
if (flags & SymbolFlags.Class) return getDeclarationOfKind(symbol, SyntaxKind.ClassExpression) ?
36233623
ScriptElementKind.localClassElement : ScriptElementKind.classElement;
36243624
if (flags & SymbolFlags.Enum) return ScriptElementKind.enumElement;
36253625
if (flags & SymbolFlags.TypeAlias) return ScriptElementKind.typeElement;
@@ -3832,7 +3832,7 @@ namespace ts {
38323832
// Special case for class expressions because we would like to indicate that
38333833
// the class name is local to the class body (similar to function expression)
38343834
// (local class) class <className>
3835-
if (symbol.getName() === "__class") {
3835+
if (getDeclarationOfKind(symbol, SyntaxKind.ClassExpression)) {
38363836
pushTypePart(ScriptElementKind.localClassElement);
38373837
}
38383838
else {

0 commit comments

Comments
 (0)