@@ -71,7 +71,7 @@ function hasExpressionInitializer(node: ts.Node):
71
71
* Determines if a node is a static member of a class.
72
72
*/
73
73
function isStaticMember ( node : ts . Node , klass : ts . Declaration ) : boolean {
74
- return ts . isPropertyDeclaration ( node ) && node . parent === klass &&
74
+ return ( ts . isPropertyDeclaration ( node ) || ts . isMethodDeclaration ( node ) ) && node . parent === klass &&
75
75
( ( ts . getCombinedModifierFlags ( node ) & ts . ModifierFlags . Static ) > 0 ) ;
76
76
}
77
77
@@ -1655,11 +1655,8 @@ class Visitor {
1655
1655
todo ( this . sourceRoot , decl , 'Emit variable delaration code' ) ;
1656
1656
}
1657
1657
1658
- if ( ts . isPropertyDeclaration ( decl ) ) {
1659
- const declNode = decl as ts . PropertyDeclaration ;
1660
- if ( isStaticMember ( declNode , declNode . parent ) ) {
1661
- this . emitFact ( vname , FactName . TAG_STATIC , '' ) ;
1662
- }
1658
+ if ( ts . isPropertyDeclaration ( decl ) && isStaticMember ( decl , decl . parent ) ) {
1659
+ this . emitFact ( vname , FactName . TAG_STATIC , '' ) ;
1663
1660
}
1664
1661
if ( ts . isPropertySignature ( decl ) ||
1665
1662
ts . isPropertyDeclaration ( decl ) ||
@@ -2157,6 +2154,9 @@ class Visitor {
2157
2154
this . emitFact ( vname , FactName . COMPLETE , 'incomplete' ) ;
2158
2155
}
2159
2156
this . emitMarkedSourceForFunction ( decl , vname ) ;
2157
+ if ( ts . isMethodDeclaration ( decl ) && isStaticMember ( decl , decl . parent ) ) {
2158
+ this . emitFact ( vname , FactName . TAG_STATIC , '' ) ;
2159
+ }
2160
2160
}
2161
2161
2162
2162
/**
0 commit comments