From 1bff90d95e3f5d690a47a10704587174a834a752 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Wed, 18 Feb 2026 16:42:21 +0000 Subject: [PATCH] chore(index): replace `any` type with union of poppler func typedefs (#748) * chore(index): replace `any` type with union of poppler func typedefs * chore(index): add `PopplerOptions` typedef --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 149c2d2..fb082a4 100644 --- a/src/index.js +++ b/src/index.js @@ -489,6 +489,8 @@ const PDF_INFO_PATH_REG = /(.+)pdfinfo/u; * @property {boolean} [printVersionInfo] Print copyright and version information. */ +/** @typedef {(PdfAttachOptions|PdfDetachOptions|PdfFontsOptions|PdfImagesOptions|PdfInfoOptions|PdfSeparateOptions|PdfToCairoOptions|PdfToHtmlOptions|PdfToPpmOptions|PdfToPsOptions|PdfToTextOptions|PdfUniteOptions)} PopplerOptions */ + /** * @typedef {object} PopplerExtraOptions * @property {AbortSignal} [signal] An `AbortSignal` that can be used to cancel the operation. @@ -580,7 +582,7 @@ function execBinary(binary, args, file, options = {}) { * version of binary. * @ignore * @param {PopplerAcceptedOptions} acceptedOptions - Object containing accepted options. - * @param {Record} options - Object containing options to pass to binary. + * @param {PopplerOptions} options - Object containing options to pass to binary. * @param {string} [version] - Version of binary. * @returns {string[]} Array of CLI arguments. * @throws {Error} If invalid arguments provided.