@@ -4682,12 +4682,13 @@ namespace ts {
4682
4682
// Make sure we only highlight the keyword when it makes sense to do so.
4683
4683
if ( isAccessibilityModifier ( modifier ) ) {
4684
4684
if ( ! ( container . kind === SyntaxKind . ClassDeclaration ||
4685
+ container . kind === SyntaxKind . ClassExpression ||
4685
4686
( declaration . kind === SyntaxKind . Parameter && hasKind ( container , SyntaxKind . Constructor ) ) ) ) {
4686
4687
return undefined ;
4687
4688
}
4688
4689
}
4689
4690
else if ( modifier === SyntaxKind . StaticKeyword ) {
4690
- if ( container . kind !== SyntaxKind . ClassDeclaration ) {
4691
+ if ( ! ( container . kind === SyntaxKind . ClassDeclaration || container . kind === SyntaxKind . ClassExpression ) ) {
4691
4692
return undefined ;
4692
4693
}
4693
4694
}
@@ -4726,12 +4727,13 @@ namespace ts {
4726
4727
( < ClassDeclaration > container . parent ) . members ) ;
4727
4728
break ;
4728
4729
case SyntaxKind . ClassDeclaration :
4729
- nodes = ( < ClassDeclaration > container ) . members ;
4730
+ case SyntaxKind . ClassExpression :
4731
+ nodes = ( < ClassLikeDeclaration > container ) . members ;
4730
4732
4731
4733
// If we're an accessibility modifier, we're in an instance member and should search
4732
4734
// the constructor's parameter list for instance members as well.
4733
4735
if ( modifierFlag & NodeFlags . AccessibilityModifier ) {
4734
- let constructor = forEach ( ( < ClassDeclaration > container ) . members , member => {
4736
+ let constructor = forEach ( ( < ClassLikeDeclaration > container ) . members , member => {
4735
4737
return member . kind === SyntaxKind . Constructor && < ConstructorDeclaration > member ;
4736
4738
} ) ;
4737
4739
0 commit comments