Type declarations help
See original GitHub issueBefore you start - checklist
- I have read documentation in README
- I have checked sample and test suites to see real life basic implementation
- I have checked if this question is not already asked
What are you trying to achieve? Please describe.
I’m trying to improve the definitions within @types/react-pdf
, but want to make sure I’ve got everything handled before opening a pull request.
Additional information
For the Page
prop onLoadSuccess
(and for most props that are called “page callbacks”), console logging the argument of the methods yields the following shape:
This doesn’t match up with the types outlined here which leverages an interface from @types/pdfjs-dist
called PDFPageProxy
.
For example, _pageIndex
is exposed even though the types indicate that pageIndex
is exposed.
Is there some parsing on page callbacks occurring beyond this method? If not, which of the two packages (pdfjs-dist / react-pdf) have the incorrect typing?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top GitHub Comments
Sad to hear regarding non-Semver…
Okay, indeed they’ve since changed it. This is very helpful thank you.
Mind if I leave this open as a means for myself and others to gain context when adjusting types?
This issue was closed because it has been stalled for 14 days with no activity.