Not so much an issue as a note for future explorers. Many of the functions of this library rely on this, and so won't work out of the box with Utils.promisify.
In order to successfully use promisify, it's necessary to use bind to correctly set the context when promisifying.
Not so much an issue as a note for future explorers. Many of the functions of this library rely on
this
, and so won't work out of the box withUtils.promisify
.In order to successfully use promisify, it's necessary to use
bind
to correctly set the context when promisifying.Example:
const fillFormWithFlatten = Utils.promisify(PDFFiller.fillFormWithFlatten.bind(PDFFiller));
await fillFormWithFlatten(original, destination, fields, false);