mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 21:37:41 -06:00
Reuse the 'captureThisForNode' function.
This commit is contained in:
parent
e0c35f2c82
commit
f8fbc22ef2
@ -965,21 +965,8 @@ namespace ts {
|
||||
|
||||
// The constructor was generated for some reason.
|
||||
// Create a captured '_this' variable.
|
||||
statements.push(
|
||||
createVariableStatement(
|
||||
/*modifiers*/ undefined,
|
||||
createVariableDeclarationList([
|
||||
createVariableDeclaration(
|
||||
"_this",
|
||||
/*type*/ undefined,
|
||||
superReturnValueOrThis
|
||||
)
|
||||
]),
|
||||
/*location*/ extendsClauseElement)
|
||||
);
|
||||
|
||||
captureThisForNode(statements, constructor, superReturnValueOrThis);
|
||||
enableSubstitutionsForCapturedThis();
|
||||
|
||||
return SuperCaptureResult.ReplaceSuperCapture;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user