Skip to content
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

SVGGraphics.getSVG has wrong return type in 3.8.162 #16745

Closed
wojtekmaj opened this issue Jul 26, 2023 · 1 comment
Closed

SVGGraphics.getSVG has wrong return type in 3.8.162 #16745

wojtekmaj opened this issue Jul 26, 2023 · 1 comment

Comments

@wojtekmaj
Copy link
Contributor

wojtekmaj commented Jul 26, 2023

Before #16543, TypeScript type for SVGGraphics was any. Now, it returns correct types. Congrats!

But, I believe there is a small mistake.

SVGGraphics.getSVG has type of (operatorList: PDFOperatorList, viewport: PageViewport) => Promise<void>, which I believe is not accurate representation of what this method does. I think it's supposed to be (operatorList: PDFOperatorList, viewport: PageViewport) => Promise<SVGElement>.

@Snuffleupagus
Copy link
Collaborator

First of all, please note that the SVG back-end is deprecated and thus should not be used. It may also be completely removed soon, see PR #16699, hence it's not clear to me that it makes much sense to try and fix this unfortunately.

Secondly, unless a TypeScript user steps up and helps out, the type-definitions are possibly going to be broken in the next PDF.js release; please see issue #16705 for additional details.

@Snuffleupagus Snuffleupagus closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2023
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

No branches or pull requests

2 participants