From 3d62f09fbd7e397525c6508216d798da1a8d1ec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20Gyovai?= Date: Thu, 7 Jul 2022 15:06:58 +0200 Subject: [PATCH] [jsdoc] failing typescript builds - wrong type `HTMLSectionElement` is not part of the DOM, so the generated typescript definitions contain a non-existing type. HTML Section elements have to be handled as simple `HTMLElements`. fixing punctuation and lint problems [jsdoc] failing typescript builds - wrong type --- src/display/annotation_layer.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/display/annotation_layer.js b/src/display/annotation_layer.js index 3b589303b..15657e330 100644 --- a/src/display/annotation_layer.js +++ b/src/display/annotation_layer.js @@ -190,7 +190,7 @@ class AnnotationElement { * @private * @param {boolean} ignoreBorder * @memberof AnnotationElement - * @returns {HTMLSectionElement} + * @returns {HTMLElement} A section element. */ _createContainer(ignoreBorder = false) { const data = this.data, @@ -410,7 +410,7 @@ class AnnotationElement { * @private * @param {boolean} ignoreBorder * @memberof AnnotationElement - * @returns {Array} + * @returns {Array} An array of section elements. */ _createQuadrilaterals(ignoreBorder = false) { if (!this.data.quadPoints) { @@ -480,7 +480,7 @@ class AnnotationElement { * @private * @param {string} className * @memberof AnnotationElement - * @returns {Array} + * @returns {Array} An array of section elements. */ _renderQuadrilaterals(className) { if ( @@ -501,7 +501,8 @@ class AnnotationElement { * * @public * @memberof AnnotationElement - * @returns {HTMLSectionElement|Array} + * @returns {HTMLElement|Array} A section element or + * an array of section elements. */ render() { unreachable("Abstract method `AnnotationElement.render` called");