@@ -4694,6 +4694,10 @@ namespace ts {
4694
4694
if ( ! ( container . kind === SyntaxKind . ModuleBlock || container . kind === SyntaxKind . SourceFile ) ) {
4695
4695
return undefined ;
4696
4696
}
4697
+ } else if ( modifier === SyntaxKind . AbstractKeyword ) {
4698
+ if ( ! ( container . kind === SyntaxKind . ClassDeclaration || declaration . kind === SyntaxKind . ClassDeclaration ) ) {
4699
+ return undefined ;
4700
+ }
4697
4701
}
4698
4702
else {
4699
4703
// unsupported modifier
@@ -4707,7 +4711,13 @@ namespace ts {
4707
4711
switch ( container . kind ) {
4708
4712
case SyntaxKind . ModuleBlock :
4709
4713
case SyntaxKind . SourceFile :
4710
- nodes = ( < Block > container ) . statements ;
4714
+ // Container is either a class declaration or the declaration is a classDeclaration
4715
+ if ( modifierFlag & NodeFlags . Abstract ) {
4716
+ nodes = ( < Node [ ] > ( < ClassDeclaration > declaration ) . members ) . concat ( declaration ) ;
4717
+ }
4718
+ else {
4719
+ nodes = ( < Block > container ) . statements ;
4720
+ }
4711
4721
break ;
4712
4722
case SyntaxKind . Constructor :
4713
4723
nodes = ( < Node [ ] > ( < ConstructorDeclaration > container ) . parameters ) . concat (
@@ -4727,6 +4737,9 @@ namespace ts {
4727
4737
nodes = nodes . concat ( constructor . parameters ) ;
4728
4738
}
4729
4739
}
4740
+ else if ( modifierFlag & NodeFlags . Abstract ) {
4741
+ nodes = nodes . concat ( container ) ;
4742
+ }
4730
4743
break ;
4731
4744
default :
4732
4745
Debug . fail ( "Invalid container kind." )
@@ -4754,6 +4767,8 @@ namespace ts {
4754
4767
return NodeFlags . Export ;
4755
4768
case SyntaxKind . DeclareKeyword :
4756
4769
return NodeFlags . Ambient ;
4770
+ case SyntaxKind . AbstractKeyword :
4771
+ return NodeFlags . Abstract ;
4757
4772
default :
4758
4773
Debug . fail ( ) ;
4759
4774
}
0 commit comments