At the moment the typings are wrong because the sign function is reported to be sign(pdfBuffer: Buffer) => Buffer. However, this is not a correct typing as the method is expected to return a promise as it is async. Therefore the typings should be sign(pdfBuffer: Buffer) => Promise<Buffer>.
Question - should we actually allow non async methods (as having it sometimes return a Promise and sometimes not is a bit of a confusing API to consume). I've changed the base implementation so it is no longer async, as this will be a bit more predictable for anyone that may be intercepting the sign method, but happy to revert that change.
At the moment the typings are wrong because the sign function is reported to be
sign(pdfBuffer: Buffer) => Buffer
. However, this is not a correct typing as the method is expected to return a promise as it isasync
. Therefore the typings should besign(pdfBuffer: Buffer) => Promise<Buffer>
.Question - should we actually allow non
async
methods (as having it sometimes return a Promise and sometimes not is a bit of a confusing API to consume). I've changed the base implementation so it is no longerasync
, as this will be a bit more predictable for anyone that may be intercepting the sign method, but happy to revert that change.