Skip to content

Commit 1bff90d

Browse files
authored
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
1 parent b59f300 commit 1bff90d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ const PDF_INFO_PATH_REG = /(.+)pdfinfo/u;
489489
* @property {boolean} [printVersionInfo] Print copyright and version information.
490490
*/
491491

492+
/** @typedef {(PdfAttachOptions|PdfDetachOptions|PdfFontsOptions|PdfImagesOptions|PdfInfoOptions|PdfSeparateOptions|PdfToCairoOptions|PdfToHtmlOptions|PdfToPpmOptions|PdfToPsOptions|PdfToTextOptions|PdfUniteOptions)} PopplerOptions */
493+
492494
/**
493495
* @typedef {object} PopplerExtraOptions
494496
* @property {AbortSignal} [signal] An `AbortSignal` that can be used to cancel the operation.
@@ -580,7 +582,7 @@ function execBinary(binary, args, file, options = {}) {
580582
* version of binary.
581583
* @ignore
582584
* @param {PopplerAcceptedOptions} acceptedOptions - Object containing accepted options.
583-
* @param {Record<string, any>} options - Object containing options to pass to binary.
585+
* @param {PopplerOptions} options - Object containing options to pass to binary.
584586
* @param {string} [version] - Version of binary.
585587
* @returns {string[]} Array of CLI arguments.
586588
* @throws {Error} If invalid arguments provided.

0 commit comments

Comments
 (0)