File tree 1 file changed +6
-6
lines changed
src/compiler/transformers
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -357,18 +357,18 @@ namespace ts {
357
357
}
358
358
359
359
function transformConstructorBody ( node : ClassDeclaration | ClassExpression , constructor : ConstructorDeclaration | undefined , isDerivedClass : boolean ) {
360
- resumeLexicalEnvironment ( ) ;
361
-
362
- let indexOfFirstStatement = 0 ;
363
- let statements : Statement [ ] = [ ] ;
364
-
365
360
const properties = getInitializedProperties ( node , /*isStatic*/ false ) ;
366
361
367
362
// Only generate synthetic constructor when there are property initializers to move.
368
363
if ( ! constructor && ! some ( properties ) ) {
369
- return undefined ;
364
+ return visitFunctionBody ( /*node*/ undefined , visitor , context ) ;
370
365
}
371
366
367
+ resumeLexicalEnvironment ( ) ;
368
+
369
+ let indexOfFirstStatement = 0 ;
370
+ let statements : Statement [ ] = [ ] ;
371
+
372
372
if ( ! constructor && isDerivedClass ) {
373
373
// Add a synthetic `super` call:
374
374
//
You can’t perform that action at this time.
0 commit comments