-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Add Promise as return type to save method #3272
Conversation
The types of the jsPDF.save method only mention jsPDF itself, but if returnPromise options is set to true the function returns a promise.
Is it a Promise? |
If you provide { returnPromise: true } as options in save, it returns a promise. But the types are not reflecting this change. It was introduced due to this discussion: |
lol. Markup changed my question. My original question was: So do you have to add |
modified accordingly. |
Not sure, as the result of saveAs is returned. Code:
|
Yeah but result in FileSaver.js is not return anything i think |
ok, perfect. Thanks for adjusting |
@HackbrettXXX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'll merge it.
The types of the jsPDF.save method only mention jsPDF itself, but if returnPromise options is set to true the function returns a promise.
Thanks for contributing to jsPDF! Please follow our
Contribution Guidelines
when creating a pull request.