Skip to content

Commit 68369a3

Browse files
debug: modify FunctionParameter mode transformation to convert FUNC_PARAM_DEFAULT to FUNC_PARAM_VARIADIC based on argument type - still at 234/258 tests
Co-Authored-By: Dan Lynch <[email protected]>
1 parent e839356 commit 68369a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/transform/src/transformers/v13-to-v14.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,10 +1030,11 @@ export class V13ToV14Transformer {
10301030
}
10311031

10321032
if (node.mode !== undefined) {
1033-
if (node.mode === "FUNC_PARAM_VARIADIC") {
1033+
if (node.mode.toString() === "FUNC_PARAM_DEFAULT") {
1034+
// Check if this should be FUNC_PARAM_VARIADIC based on context
10341035
const isVariadicType = this.isVariadicParameterType(node.argType);
10351036
result.mode = isVariadicType ? "FUNC_PARAM_VARIADIC" : "FUNC_PARAM_DEFAULT";
1036-
} else if (node.mode === "FUNC_PARAM_IN") {
1037+
} else if (node.mode.toString() === "FUNC_PARAM_IN") {
10371038
result.mode = "FUNC_PARAM_DEFAULT";
10381039
} else {
10391040
result.mode = node.mode;

0 commit comments

Comments
 (0)