Return Type of "generatePdf" Method
Opened this issue · 1 comments
decozo150 commented
The return type of the "generatePdf" method should be "Buffer" instead of "void":
export function generatePdf(
file: File,
options?: Options,
callback?: (err: Error, buffer: Buffer) => void,
): void // this should be Buffer;
maiksicks commented
In the current version, the return type is Promise<Buffer>
.
This is my workaround for typescript:
const output = await (generatePdf(...) as unknown as Promise<Buffer>);