From df912e9ab6893208d8dd945dad751676db16f7c7 Mon Sep 17 00:00:00 2001 From: Federico Bond <federicobond@gmail.com> Date: Thu, 25 Aug 2022 13:36:05 -0300 Subject: [PATCH] Update types in PDFPageViewOptions to properly declare optional parameters --- web/pdf_page_view.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index 2b3b2c976..cbeba8634 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -58,13 +58,13 @@ import { TextAccessibilityManager } from "./text_accessibility.js"; * @property {HTMLDivElement} [container] - The viewer element. * @property {EventBus} eventBus - The application event bus. * @property {number} id - The page unique ID (normally its number). - * @property {number} scale - The page scale display. + * @property {number} [scale] - The page scale display. * @property {PageViewport} defaultViewport - The page viewport. * @property {Promise<OptionalContentConfig>} [optionalContentConfigPromise] - * A promise that is resolved with an {@link OptionalContentConfig} instance. * The default value is `null`. - * @property {PDFRenderingQueue} renderingQueue - The rendering queue object. - * @property {IPDFTextLayerFactory} textLayerFactory + * @property {PDFRenderingQueue} [renderingQueue] - The rendering queue object. + * @property {IPDFTextLayerFactory} [textLayerFactory] * @property {number} [textLayerMode] - Controls if the text layer used for * selection and searching is created, and if the improved text selection * behaviour is enabled. The constants from {TextLayerMode} should be used. @@ -74,10 +74,10 @@ import { TextAccessibilityManager } from "./text_accessibility.js"; * being rendered. The constants from {@link AnnotationMode} should be used; * see also {@link RenderParameters} and {@link GetOperatorListParameters}. * The default value is `AnnotationMode.ENABLE_FORMS`. - * @property {IPDFAnnotationLayerFactory} annotationLayerFactory - * @property {IPDFAnnotationEditorLayerFactory} annotationEditorLayerFactory - * @property {IPDFXfaLayerFactory} xfaLayerFactory - * @property {IPDFStructTreeLayerFactory} structTreeLayerFactory + * @property {IPDFAnnotationLayerFactory} [annotationLayerFactory] + * @property {IPDFAnnotationEditorLayerFactory} [annotationEditorLayerFactory] + * @property {IPDFXfaLayerFactory} [xfaLayerFactory] + * @property {IPDFStructTreeLayerFactory} [structTreeLayerFactory] * @property {Object} [textHighlighterFactory] * @property {string} [imageResourcesPath] - Path for image resources, mainly * for annotation icons. Include trailing slash. @@ -89,7 +89,7 @@ import { TextAccessibilityManager } from "./text_accessibility.js"; * @property {Object} [pageColors] - Overwrites background and foreground colors * with user defined ones in order to improve readability in high contrast * mode. - * @property {IL10n} l10n - Localization service. + * @property {IL10n} [l10n] - Localization service. */ const MAX_CANVAS_PIXELS = compatibilityParams.maxCanvasPixels || 16777216;