With the latest version, when building a project with reference to @signpdf the build fails at least with PNPM / TSC combination.
The error is ../../node_modules/.pnpm/@signpdf+placeholder-pdf-lib@3.2.3_pdf-lib@1.17.1/node_modules/@signpdf/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts:5:14 - error TS2304: Cannot find name 'PDFPage'.
Is it a bug in signing or in the helpers?
The bug is in this commit: https://github.com/vbuch/node-signpdf/commit/474152be0cf015b7dcc36befaee511e43637cea2
in file packages/placeholder-pdf-lib/src/pdflibAddPlaceholder.js: A line with pdfPage: PDFPage has been added, but there is no typing for this (like there is e.g. for PDFDocument @typedef {import('pdf-lib').PDFDocument} PDFDocument)
To fix, probably just add: @typedef {import('pdf-lib').PDFPage} PDFPage
Describe the bug and the expected behaviour
With the latest version, when building a project with reference to @signpdf the build fails at least with PNPM / TSC combination. The error is
../../node_modules/.pnpm/@signpdf+placeholder-pdf-lib@3.2.3_pdf-lib@1.17.1/node_modules/@signpdf/placeholder-pdf-lib/dist/pdflibAddPlaceholder.d.ts:5:14 - error TS2304: Cannot find name 'PDFPage'.
Is it a bug in signing or in the helpers?
The bug is in this commit: https://github.com/vbuch/node-signpdf/commit/474152be0cf015b7dcc36befaee511e43637cea2
in file
packages/placeholder-pdf-lib/src/pdflibAddPlaceholder.js
: A line withpdfPage: PDFPage
has been added, but there is no typing for this (like there is e.g. for PDFDocument@typedef {import('pdf-lib').PDFDocument} PDFDocument
)To fix, probably just add:
@typedef {import('pdf-lib').PDFPage} PDFPage