Skip to content

Commit 216c058

Browse files
committed
feat: add null check for function parameters in getNodeFunction
1 parent be60d91 commit 216c058

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/util/nodes.util.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ const createNodeFunctionIfCompatible = (
6868
functions: FunctionDefinition[],
6969
paramType: ts.Type
7070
): NodeFunction | null => {
71+
72+
if (func.parameters.length > 0)
73+
return null;
74+
7175
// Extract the function signature and its return type
7276
const signature = checker.getSignatureFromDeclaration(func);
7377
const returnType = checker.getReturnTypeOfSignature(signature!);

0 commit comments

Comments
 (0)