From 725ae4998c054fa2937a3ae51be3035e88f08ac2 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sun, 24 Nov 2024 21:22:56 +0100 Subject: [PATCH] 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. --- src/display/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display/api.js b/src/display/api.js index 012e45a63..5128316fb 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -848,8 +848,8 @@ class PDFDocumentProxy { } /** - * @type {Array} A (not guaranteed to be) unique ID to - * identify the PDF document. + * @type {Array} 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. */