• Builds a function declaration from a TypeScript function.

    This utility analyzes the function signature and JSDoc comments to create a FunctionDeclaration object that can be used with LLMs.

    Parameters

    • func: ((...args: any[]) => any)

      The function to analyze

        • (...args): any
        • Parameters

          • Rest...args: any[]

          Returns any

    • options: BuildFunctionDeclarationOptions = {}

      Options for customizing the declaration

    Returns FunctionDeclaration

    A FunctionDeclaration representing the function