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

Make downloadManager optional in JSDoc types #17038

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

ayushmourya
Copy link
Contributor

This pull request addresses an issue where the downloadManager parameter was incorrectly marked as required in the JSDoc types for AnnotationLayerParameters and AnnotationLayerBuilderOptions. The change aligns the parameter with similar optional parameters in the codebase for better consistency.

Details:

In pdf.js/src/display/annotation_layer.js, I updated the JSDoc comments for AnnotationLayerParameters to make downloadManager optional using square brackets.
In pdf.js/web/annotation_layer_builder.js, I did the same for the JSDoc comments for AnnotationLayerBuilderOptions.
Additionally, in pdf.js/web/text_layer_builder.js, I marked the downloadManager parameter as optional in the JSDoc comment to maintain consistency with other optional parameters.
Expected Behavior:

The downloadManager parameter should be considered optional in the JSDoc types.
What Went Wrong:

Previously, downloadManager was incorrectly marked as a required parameter.
Configuration:

PDF.js version: 2.11.174
Browser extension: No
This change resolves the issue where downloadManager was mistakenly marked as required, making it optional in the JSDoc types, improving codebase consistency.

Closes: #17029

@ayushmourya
Copy link
Contributor Author

@calixteman could you please review this.

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@calixteman calixteman merged commit b6d75e7 into mozilla:master Sep 28, 2023
3 checks passed
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.

Make downloadManager optional in JSDoc types
2 participants