babel-plugin-react-compiler 0.0.0-experimental-3868508-20250826 → 0.0.0-experimental-a895f5f-20250827
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +20 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -65774,7 +65774,8 @@ function printType(type) {
|
|
65774
65774
|
if (type.kind === "Object" && type.shapeId != null) {
|
65775
65775
|
return `:T${type.kind}<${type.shapeId}>`;
|
65776
65776
|
} else if (type.kind === "Function" && type.shapeId != null) {
|
65777
|
-
|
65777
|
+
const returnType = printType(type.return);
|
65778
|
+
return `:T${type.kind}<${type.shapeId}>()${returnType !== "" ? `: ${returnType}` : ""}`;
|
65778
65779
|
} else {
|
65779
65780
|
return `:T${type.kind}`;
|
65780
65781
|
}
|
@@ -85490,6 +85491,16 @@ function computeSignatureForInstruction(context, env, instr) {
|
|
85490
85491
|
});
|
85491
85492
|
}
|
85492
85493
|
}
|
85494
|
+
for (const prop of value.props) {
|
85495
|
+
if (prop.kind === "JsxAttribute" && prop.place.identifier.type.kind === "Function" && (isJsxType(prop.place.identifier.type.return) || prop.place.identifier.type.return.kind === "Phi" && prop.place.identifier.type.return.operands.some(
|
85496
|
+
(operand) => isJsxType(operand)
|
85497
|
+
))) {
|
85498
|
+
effects.push({
|
85499
|
+
kind: "Render",
|
85500
|
+
place: prop.place
|
85501
|
+
});
|
85502
|
+
}
|
85503
|
+
}
|
85493
85504
|
}
|
85494
85505
|
break;
|
85495
85506
|
}
|
@@ -92135,6 +92146,14 @@ var Unifier = class {
|
|
92135
92146
|
if (type.kind === "Phi") {
|
92136
92147
|
return { kind: "Phi", operands: type.operands.map((o) => this.get(o)) };
|
92137
92148
|
}
|
92149
|
+
if (type.kind === "Function") {
|
92150
|
+
return {
|
92151
|
+
kind: "Function",
|
92152
|
+
isConstructor: type.isConstructor,
|
92153
|
+
shapeId: type.shapeId,
|
92154
|
+
return: this.get(type.return)
|
92155
|
+
};
|
92156
|
+
}
|
92138
92157
|
return type;
|
92139
92158
|
}
|
92140
92159
|
};
|
package/package.json
CHANGED