File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ module.exports = {
102
102
* TS-prefixed nodes
103
103
*/
104
104
TSAbstractClassProperty : "TSAbstractClassProperty" ,
105
+ TSAbstractFunctionExpression : "TSAbstractFunctionExpression" ,
105
106
TSAbstractKeyword : "TSAbstractKeyword" ,
106
107
TSAbstractMethodDefinition : "TSAbstractMethodDefinition" ,
107
108
TSAnyKeyword : "TSAnyKeyword" ,
Original file line number Diff line number Diff line change @@ -868,8 +868,9 @@ module.exports = function convert(config) {
868
868
869
869
const methodLoc = ast . getLineAndCharacterOfPosition ( openingParen . getStart ( ) ) ,
870
870
nodeIsMethod = ( node . kind === SyntaxKind . MethodDeclaration ) ,
871
+ isMethodAbstract = nodeUtils . hasModifier ( SyntaxKind . AbstractKeyword , node ) ,
871
872
method = {
872
- type : AST_NODE_TYPES . FunctionExpression ,
873
+ type : isMethodAbstract ? AST_NODE_TYPES . TSAbstractFunctionExpression : AST_NODE_TYPES . FunctionExpression ,
873
874
id : null ,
874
875
generator : ! ! node . asteriskToken ,
875
876
expression : false ,
@@ -913,7 +914,7 @@ module.exports = function convert(config) {
913
914
/**
914
915
* TypeScript class methods can be defined as "abstract"
915
916
*/
916
- const methodDefinitionType = nodeUtils . hasModifier ( SyntaxKind . AbstractKeyword , node )
917
+ const methodDefinitionType = isMethodAbstract
917
918
? AST_NODE_TYPES . TSAbstractMethodDefinition
918
919
: AST_NODE_TYPES . MethodDefinition ;
919
920
Original file line number Diff line number Diff line change @@ -1179,7 +1179,7 @@ Object {
1179
1179
},
1180
1180
},
1181
1181
},
1182
- "type": "FunctionExpression ",
1182
+ "type": "TSAbstractFunctionExpression ",
1183
1183
},
1184
1184
},
1185
1185
],
You can’t perform that action at this time.
0 commit comments