1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-23 08:38:06 +02:00

Fix the type definition of the fingerprints getter in src/display/api.js

The `Array` type takes one parameter that describes the possible types
of the inner  elements. This parameter may exist of pipes to indicate
multiple possible types. However, the current type definition provides
multiple parameters; this is incorrect syntax, and TypeScript 5.7+ now
fails on this due to stricter syntax validation.

This commit fixes the issue by changing the type definition to the
proper syntax, which together with the accompanying comment about the
contents of the fingerprints array should document it sufficiently.
This commit is contained in:
Tim van der Meij 2024-11-24 21:22:56 +01:00
parent d45a61b579
commit 725ae4998c
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762

View file

@ -848,8 +848,8 @@ class PDFDocumentProxy {
}
/**
* @type {Array<string, string|null>} A (not guaranteed to be) unique ID to
* identify the PDF document.
* @type {Array<string | null>} A (not guaranteed to be) unique ID to identify
* the PDF document.
* NOTE: The first element will always be defined for all PDF documents,
* whereas the second element is only defined for *modified* PDF documents.
*/