mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 21:07:52 -05:00
Remove usage of 'useCapturedThis'.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user