Closed zentetsukenz closed 5 months ago
Describe the bug and the expected behaviour
I have encountered a type incompatibility issue between the expected Signer and P12Signer. The bug is causing unexpected behavior when attempting to use the sign function.
Signer
P12Signer
sign
Basically this code
await signpdf.sign(pdfWithPlaceholder, p12Signer);
will report type incompatibility between expected Signer (by sign function) and p12Signer'ssign function.
p12Signer
Is it a bug in signing or in the helpers?
The issue appears to be related to the signing functionality, specifically in the P12Signer implementation.
To Reproduce
Upgrade both @signpdf/signer-p12 and @signpdf/signpdf to 3.2.0
@signpdf/signer-p12
@signpdf/signpdf
3.2.0
"@signpdf/signer-p12": "^3.2.0", "@signpdf/signpdf": "^3.2.0",
Typescript should now report type incompatibility between them.
Here is an example of the report from type checking.
And upon further inspection
Describe the bug and the expected behaviour
I have encountered a type incompatibility issue between the expected
Signer
andP12Signer
. The bug is causing unexpected behavior when attempting to use thesign
function.Basically this code
will report type incompatibility between expected
Signer
(bysign
function) andp12Signer
'ssign
function.Is it a bug in signing or in the helpers?
The issue appears to be related to the signing functionality, specifically in the
P12Signer
implementation.To Reproduce
Upgrade both
@signpdf/signer-p12
and@signpdf/signpdf
to3.2.0
Typescript should now report type incompatibility between them.
Here is an example of the report from type checking.
And upon further inspection