mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-15 09:44:03 +02:00
Fix types to make "gulp typestest" succeeding
This commit is contained in:
parent
63110e34a7
commit
45c7805daf
2
.github/workflows/types_tests.yml
vendored
2
.github/workflows/types_tests.yml
vendored
@ -28,4 +28,4 @@ jobs:
|
||||
run: npm ci
|
||||
|
||||
- name: Run types tests
|
||||
run: npx gulp types
|
||||
run: npx gulp typestest
|
||||
|
||||
@ -23,6 +23,10 @@
|
||||
/** @typedef {import("../../web/struct_tree_layer_builder.js").StructTreeLayerBuilder} StructTreeLayerBuilder */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("../../web/comment_manager.js").CommentManager} CommentManager */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("../../web/pdf_link_service.js").PDFLinkService} PDFLinkService */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("../../web/base_download_manager.js").BaseDownloadManager} BaseDownloadManager */
|
||||
|
||||
import {
|
||||
AnnotationBorderStyleType,
|
||||
|
||||
@ -22,7 +22,8 @@
|
||||
/** @typedef {import("../annotation_layer.js").AnnotationLayer} AnnotationLayer */
|
||||
/** @typedef {import("../draw_layer.js").DrawLayer} DrawLayer */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("../src/display/struct_tree_layer_builder.js").StructTreeLayerBuilder} StructTreeLayerBuilder */
|
||||
/** @typedef {import("../../../web/struct_tree_layer_builder.js").StructTreeLayerBuilder} StructTreeLayerBuilder */
|
||||
/** @typedef {import("../../../web/l10n.js").L10n} L10n */
|
||||
|
||||
import {
|
||||
AnnotationEditorPrefix,
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("./annotation_storage").AnnotationStorage} AnnotationStorage */
|
||||
/** @typedef {import("./display_utils").PageViewport} PageViewport */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("../../web/pdf_link_service.js").PDFLinkService} PDFLinkService */
|
||||
|
||||
import { XfaText } from "./xfa_text.js";
|
||||
|
||||
|
||||
@ -25,6 +25,9 @@
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("../src/display/editor/tools.js").AnnotationEditorUIManager} AnnotationEditorUIManager */
|
||||
/** @typedef {import("./comment_manager.js").CommentManager} CommentManager */
|
||||
/** @typedef {import("./pdf_link_service.js").PDFLinkService} PDFLinkService */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("./base_download_manager.js").BaseDownloadManager} BaseDownloadManager */
|
||||
|
||||
import {
|
||||
AnnotationLayer,
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
/** @typedef {import("../src/display/api").PDFDocumentProxy} PDFDocumentProxy */
|
||||
/** @typedef {import("./event_utils").EventBus} EventBus */
|
||||
/** @typedef {import("./pdf_link_service.js").PDFLinkService} PDFLinkService */
|
||||
|
||||
import { binarySearchFirstItem, scrollIntoView } from "./ui_utils.js";
|
||||
import { getCharacterType, getNormalizeWithNFKC } from "./pdf_find_utils.js";
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
/** @typedef {import("./event_utils").EventBus} EventBus */
|
||||
/** @typedef {import("./pdf_link_service.js").PDFLinkService} PDFLinkService */
|
||||
|
||||
import { isValidRotation, parseQueryString } from "./ui_utils.js";
|
||||
import { updateUrlHash } from "pdfjs-lib";
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("./pdf_rendering_queue").PDFRenderingQueue} PDFRenderingQueue */
|
||||
/** @typedef {import("./comment_manager.js").CommentManager} CommentManager */
|
||||
/** @typedef {import("./l10n.js").L10n} L10n */
|
||||
|
||||
import {
|
||||
AbortException,
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
/** @typedef {import("./pdf_viewer").PDFViewer} PDFViewer */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("./pdf_thumbnail_viewer").PDFThumbnailViewer} PDFThumbnailViewer */
|
||||
/** @typedef {import("./renderable_view").RenderableView} RenderableView */
|
||||
|
||||
import { RenderingCancelledException } from "pdfjs-lib";
|
||||
import { RenderingStates } from "./renderable_view.js";
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
/** @typedef {import("./event_utils").EventBus} EventBus */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("./pdf_rendering_queue").PDFRenderingQueue} PDFRenderingQueue */
|
||||
/** @typedef {import("./pdf_link_service.js").PDFLinkService} PDFLinkService */
|
||||
|
||||
import {
|
||||
binarySearchFirstItem,
|
||||
|
||||
@ -24,6 +24,10 @@
|
||||
/** @typedef {import("./pdf_find_controller").PDFFindController} PDFFindController */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("./pdf_scripting_manager").PDFScriptingManager} PDFScriptingManager */
|
||||
/** @typedef {import("./pdf_link_service.js").PDFLinkService} PDFLinkService */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("./base_download_manager.js").BaseDownloadManager} BaseDownloadManager */
|
||||
/** @typedef {import("./l10n.js").L10n} L10n */
|
||||
|
||||
import {
|
||||
AnnotationEditorType,
|
||||
|
||||
@ -28,7 +28,7 @@ class RenderableView {
|
||||
renderingId = "";
|
||||
|
||||
/**
|
||||
* @type {RenderTask | null}
|
||||
* @type {import("../src/display/api").RenderTask | null}
|
||||
*/
|
||||
renderTask = null;
|
||||
|
||||
@ -47,14 +47,14 @@ class RenderableView {
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {RenderingStates}
|
||||
* @type {number}
|
||||
*/
|
||||
get renderingState() {
|
||||
throw new Error("Abstract getter `renderingState` accessed");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {RenderingStates}
|
||||
* @param {number} state
|
||||
*/
|
||||
set renderingState(state) {
|
||||
throw new Error("Abstract setter `renderingState` accessed");
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
/** @typedef {import("../src/display/annotation_storage").AnnotationStorage} AnnotationStorage */
|
||||
// eslint-disable-next-line max-len
|
||||
/** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */
|
||||
/** @typedef {import("./pdf_link_service.js").PDFLinkService} PDFLinkService */
|
||||
|
||||
import { XfaLayer } from "pdfjs-lib";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user