-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Improve type definitions for the viewer #17879
Conversation
Given that the default viewer is not intended to be directly used by third-parties, and thus isn't included in
|
@Snuffleupagus this could help people who want to extend the viewer. Plus there are also lots of nice utils within the web folder. Also added jsdoc types could be helpful for project's contributors. But if you think this is not within the scope of the project, we can remove the entrypoint, and just add the type fixes. |
That'd be a requirement as far as I'm concerned. Please note that the existing type definitions are unused within the PDF.js project, but has nonetheless added a bunch of work for the core contributors; hence we don't want to further increase that. Also, please make sure to write a good commit message. |
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.
Addressed requested changes, changed commit message / pr name.
Also added eslint-disable-next-line
where needed.
squashed |
Before we can merge this please also include a better commit message. The guidelines at https://cbea.ms/git-commit/ could help with this. The commit message should primarily contain which change is being made and why; implementation details like which files or classes are changed can usually be left out because that's already clear from the commit diff. The following commit message (or something similar) could be a suggestion here:
|
Got it. Set to your suggested description, as it fully describes what this pr is about. |
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.
Looks good to me with the comments below addressed, but given the original review I'll leave the final approval to @Snuffleupagus. Thanks!
This commit improves compatibility of the viewer code with TypeScript by including missing type imports/definitions and correcting existing ones
removed the default value for |
@timvandermeij in my opinion a proper fix for |
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.
r=me, thanks.
This commit improves compatibility of the viewer code with TypeScript by including missing type imports/definitions and correcting existing ones