Mend
Bun

method

FileSink.end

error?: Error
): number | Promise<number>;

Close the file descriptor. This also flushes the internal buffer.

@param error

Optional error to associate with the close operation

@returns

Number of bytes written or a Promise resolving to the number of bytes

Referenced types

interface Error