diff --git a/src/compiler/transformers/es6.ts b/src/compiler/transformers/es6.ts index 995b04c74da..2f529a09f9b 100644 --- a/src/compiler/transformers/es6.ts +++ b/src/compiler/transformers/es6.ts @@ -783,8 +783,6 @@ namespace ts { function addConstructor(statements: Statement[], node: ClassExpression | ClassDeclaration, extendsClauseElement: ExpressionWithTypeArguments): void { const constructor = getFirstConstructorWithBody(node); const hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined); - const savedUseCapturedThis = useCapturedThis; - useCapturedThis = true; const constructorFunction = createFunctionDeclaration( @@ -802,7 +800,6 @@ namespace ts { if (extendsClauseElement) { setNodeEmitFlags(constructorFunction, NodeEmitFlags.CapturesThis); } - useCapturedThis = savedUseCapturedThis; statements.push(constructorFunction); }