1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #16888 from stof/fix_jsdoc_types

Fix JSDoc types
This commit is contained in:
Jonas Jenwald 2023-08-31 16:36:09 +02:00 committed by GitHub
commit b159cc9e4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 38 additions and 13 deletions

View file

@ -15,7 +15,10 @@
/** @typedef {import("./api").PDFPageProxy} PDFPageProxy */
/** @typedef {import("./display_utils").PageViewport} PageViewport */
/** @typedef {import("./interfaces").IDownloadManager} IDownloadManager */
// eslint-disable-next-line max-len
/** @typedef {import("../../web/text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
// eslint-disable-next-line max-len
/** @typedef {import("../../web/interfaces").IDownloadManager} IDownloadManager */
/** @typedef {import("../../web/interfaces").IPDFLinkService} IPDFLinkService */
import {

View file

@ -17,10 +17,10 @@
/** @typedef {import("./tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
/** @typedef {import("../display_utils.js").PageViewport} PageViewport */
// eslint-disable-next-line max-len
/** @typedef {import("../../web/text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
/** @typedef {import("../../web/interfaces").IL10n} IL10n */
/** @typedef {import("../../../web/text_accessibility.js").TextAccessibilityManager} TextAccessibilityManager */
/** @typedef {import("../../../web/interfaces").IL10n} IL10n */
// eslint-disable-next-line max-len
/** @typedef {import("../src/display/annotation_layer.js").AnnotationLayer} AnnotationLayer */
/** @typedef {import("../annotation_layer.js").AnnotationLayer} AnnotationLayer */
import { AnnotationEditorType, FeatureTest } from "../../shared/util.js";
import { AnnotationEditor } from "./editor.js";

View file

@ -146,7 +146,7 @@ class AnnotationEditor {
* @param {string} mime
* @returns {boolean}
*/
static isHandlingMimeForPasting(_mime) {
static isHandlingMimeForPasting(mime) {
return false;
}
@ -998,7 +998,7 @@ class AnnotationEditor {
* @param {boolean} isForCopying
* @param {Object} [context]
*/
serialize(_isForCopying = false, _context = null) {
serialize(isForCopying = false, context = null) {
unreachable("An editor must be serializable");
}

View file

@ -891,7 +891,7 @@ class InkEditor extends AnnotationEditor {
/**
* Convert into a Path2D.
* @param {Arra<Array<number>} bezier
* @param {Array<Array<number>>} bezier
* @returns {Path2D}
*/
static #buildPath2D(bezier) {

View file

@ -418,7 +418,7 @@ class KeyboardManager {
/**
* Execute a callback, if any, for a given keyboard event.
* The self is used as `this` in the callback.
* @param {Object} self.
* @param {Object} self
* @param {KeyboardEvent} event
* @returns
*/

View file

@ -13,6 +13,11 @@
* limitations under the License.
*/
/** @typedef {import("../interfaces").IPDFStream} IPDFStream */
/** @typedef {import("../interfaces").IPDFStreamReader} IPDFStreamReader */
// eslint-disable-next-line max-len
/** @typedef {import("../interfaces").IPDFStreamRangeReader} IPDFStreamRangeReader */
import { assert, PromiseCapability } from "../shared/util.js";
import { isPdfFile } from "./display_utils.js";

View file

@ -13,6 +13,8 @@
* limitations under the License.
*/
// eslint-disable-next-line max-len
/** @typedef {import("./annotation_storage").AnnotationStorage} AnnotationStorage */
/** @typedef {import("./display_utils").PageViewport} PageViewport */
/** @typedef {import("../../web/interfaces").IPDFLinkService} IPDFLinkService */

View file

@ -13,6 +13,8 @@
* limitations under the License.
*/
/** @typedef {import("./api").TextContent} TextContent */
class XfaText {
/**
* Walk an XFA tree and create an array of text nodes that is compatible