diff --git a/src/extract.ts b/src/extract.ts index 140b6d5..2fe6312 100644 --- a/src/extract.ts +++ b/src/extract.ts @@ -240,7 +240,7 @@ function processFunctionDeclaration(declaration: string, usedTypes: Set, // Fix invalid ending `):;` to `;` const result = `${isExported ? 'export ' : ''}declare ${asyncKeyword}function ${functionName}(${params}): ${returnType};` logDebug(`Processed function declaration: ${result}`) - return result + return result.replace('function function', 'function') } function getReturnType(functionSignature: string): string {