Skip to content

Incorrect type definitions for attachments #463

@peperoli

Description

@peperoli

The attachments property accepts File and Blob:

export type MessageAttachment = CustomFile | CustomFile[] | File | File[] | string | CustomFileData | CustomFileData[];

But it's not (properly) implemented, passing a File object will cause a TypeError: source.on is not a function at Function.DelayedStream.create, the same happens for Blob as mentioned in #254. Buffer works, so the type definition should be updated accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions