Skip to content

Conversation

@spicimedved
Copy link

@spicimedved spicimedved commented Oct 8, 2025

Pull Request Description

Problem

The JSDoc for method handling attachments upload incorrectly uses Buffer as a valid type for the file parameter. However, the underlying code does not support the Buffer type, and attempting to use it results in a runtime failure.

The incorrect JSDoc type (file: Buffer) creates a confusing experience for developers. It leads them to pass file data as a Buffer, which is not supported by the code and causes hard-to-diagnose errors.

Solution

The JSDoc type for the attachment upload file parameter was updated to reflect the actual implementation.

The type has been changed from Buffer to FormData | Stream | PathLike, as using a Buffer causes a runtime error. This change ensures the types are correct and prevents improper usage.


Related Issue(s)


Documentation

  • I have updated the documentation accordingly.
  • No updates are required.

Checklist

  • I have read the CONTRIBUTING documentation.
  • My code follows the coding standards of this project.
  • All existing tests passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant