Skip to content

Conversation

KurtGokhan
Copy link
Contributor

This fixes a problem I had when I tried to use html API manually in Typescript. Since it is wrapped in Promise, Typescript will unwrap it all the way down and resolve the awaited type to any. It should have been HTMLWorker since it already extends Promise. Also added some useful methods to HTMLWorker type.

Also fixes #3238

Copy link
Collaborator

@HackbrettXXX HackbrettXXX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good. Could you also add format to the ImageOptions type?

@KurtGokhan
Copy link
Contributor Author

@KurtGokhan
Copy link
Contributor Author

Ah, sorry. I will add it to ImageOptions

Copy link
Collaborator

@HackbrettXXX HackbrettXXX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, thanks.

@HackbrettXXX HackbrettXXX merged commit 65f4027 into parallax:master Oct 28, 2021
@KurtGokhan KurtGokhan deleted the typescript-fixes branch October 28, 2021 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extension to Types/index.d.ts to allow more complete use of jsPDF from Typescript
2 participants