summaryrefslogtreecommitdiff
path: root/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
commitf06956efd2dc4bf77244a9fcce2b883a00b925af (patch)
tree0123cb73ce67f1f4b17e1d6cbabff076ee44e31b /node_modules/@babel/helper-create-class-features-plugin/lib/fields.js
parent8d980c13970c15b6d2312b6fc4ac51698dd0d220 (diff)
updated node modules
Diffstat (limited to 'node_modules/@babel/helper-create-class-features-plugin/lib/fields.js')
-rw-r--r--node_modules/@babel/helper-create-class-features-plugin/lib/fields.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js b/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js
index 253bc0cd..981cf0b3 100644
--- a/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js
+++ b/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js
@@ -699,6 +699,7 @@ function buildFieldsInitNodes(ref, superRef, props, privateNamesMap, file, setPu
let injectSuperRef;
const staticNodes = [];
const instanceNodes = [];
+ let lastInstanceNodeReturnsThis = false;
const pureStaticNodes = [];
let classBindingNode = null;
const getSuperRef = _core.types.isIdentifier(superRef) ? () => superRef : () => {
@@ -739,6 +740,7 @@ function buildFieldsInitNodes(ref, superRef, props, privateNamesMap, file, setPu
classRefFlags |= 2;
}
}
+ lastInstanceNodeReturnsThis = false;
switch (true) {
case isStaticBlock:
{
@@ -790,6 +792,7 @@ function buildFieldsInitNodes(ref, superRef, props, privateNamesMap, file, setPu
instanceNodes.push(buildPublicFieldInitLoose(_core.types.thisExpression(), prop));
break;
case isInstance && isPublic && isField && !setPublicClassFields:
+ lastInstanceNodeReturnsThis = true;
instanceNodes.push(buildPublicFieldInitSpec(_core.types.thisExpression(), prop, file));
break;
default:
@@ -802,6 +805,7 @@ function buildFieldsInitNodes(ref, superRef, props, privateNamesMap, file, setPu
return {
staticNodes: staticNodes.filter(Boolean),
instanceNodes: instanceNodes.filter(Boolean),
+ lastInstanceNodeReturnsThis,
pureStaticNodes: pureStaticNodes.filter(Boolean),
classBindingNode,
wrapClass(path) {