This repository was archived by the owner on Jan 14, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-25
lines changed Expand file tree Collapse file tree 2 files changed +21
-25
lines changed Original file line number Diff line number Diff line change @@ -314,16 +314,6 @@ tester.addFixturePatternConfig('typescript/basics', {
314
314
* TODO: remove me in next babel > 7.2.3
315
315
*/
316
316
'arrow-function-with-type-parameters' ,
317
- /**
318
- * Babel: ClassDeclaration + abstract: true
319
- * ts-estree: TSAbstractClassDeclaration
320
- */
321
- 'abstract-class-with-abstract-properties' ,
322
- /**
323
- * Babel: ClassProperty + abstract: true
324
- * ts-estree: TSAbstractClassProperty
325
- */
326
- 'abstract-class-with-abstract-readonly-property' ,
327
317
/**
328
318
* Babel: TSExpressionWithTypeArguments
329
319
* ts-estree: ClassImplements
@@ -465,21 +455,7 @@ tester.addFixturePatternConfig('typescript/types', {
465
455
} ) ;
466
456
467
457
tester . addFixturePatternConfig ( 'typescript/declare' , {
468
- fileType : 'ts' ,
469
- ignore : [
470
- /**
471
- * AST difference
472
- * ts-estree: heritage = []
473
- * babel: heritage = undefined
474
- */
475
- 'interface' ,
476
- /**
477
- * AST difference
478
- * ts-estree: TSAbstractClassDeclaration
479
- * babel: ClassDeclaration[abstract=true]
480
- */
481
- 'abstract-class'
482
- ]
458
+ fileType : 'ts'
483
459
} ) ;
484
460
485
461
tester . addFixturePatternConfig ( 'typescript/namespaces-and-modules' , {
Original file line number Diff line number Diff line change @@ -231,6 +231,26 @@ export function preprocessBabylonAST(ast: any): any {
231
231
type : AST_NODE_TYPES . Identifier
232
232
} ;
233
233
}
234
+ } ,
235
+ /**
236
+ * Babel: ClassDeclaration + abstract: true
237
+ * ts-estree: TSAbstractClassDeclaration
238
+ */
239
+ ClassDeclaration ( node : any ) {
240
+ if ( node . abstract ) {
241
+ node . type = 'TSAbstractClassDeclaration' ;
242
+ delete node . abstract ;
243
+ }
244
+ } ,
245
+ /**
246
+ * Babel: ClassProperty + abstract: true
247
+ * ts-estree: TSAbstractClassProperty
248
+ */
249
+ ClassProperty ( node : any , parent : any ) {
250
+ if ( node . abstract ) {
251
+ node . type = 'TSAbstractClassProperty' ;
252
+ delete node . abstract ;
253
+ }
234
254
}
235
255
}
236
256
) ;
You can’t perform that action at this time.
0 commit comments