Open decozo150 opened 1 year ago
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;
In the current version, the return type is Promise<Buffer>.
Promise<Buffer>
This is my workaround for typescript:
const output = await (generatePdf(...) as unknown as Promise<Buffer>);
The return type of the "generatePdf" method should be "Buffer" instead of "void":