You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package currently lacks type definitions, which makes it challenging to use in TypeScript projects without relying on custom typings or any types. It would be beneficial to include those type definitions either within the package itself or by providing a separate @types/pdf-signatures package. This enhancement would improve developer experience and integration in TypeScript environments.
The text was updated successfully, but these errors were encountered:
JonathanXDR
added a commit
to JonathanXDR/pdf-signatures
that referenced
this issue
Dec 19, 2024
FixesAdvanon#22
Add TypeScript type definitions to the `pdf-signatures` package.
* **Add `src/main/js/index.d.ts` file:**
- Define TypeScript types for `addSignaturePlaceholderToPdf`, `pdfDigest`, `signPdf`, and `addLtvToPdf` functions.
- Define TypeScript types for `CertificationLevels` and `HashAlgorithms` enums.
- Add JSDoc comments to the type definitions for better documentation.
- Add detailed comments for each function and interface to provide better context and usage examples.
- Add interfaces for the return types of the functions for better type safety.
- Create separate interfaces for different types of errors that can be thrown by the functions, such as `PdfSignaturesError`.
* **Update `package.json`:**
- Add `types` field pointing to `src/main/js/index.d.ts`.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Advanon/pdf-signatures/issues/22?shareId=XXXX-XXXX-XXXX-XXXX).
The package currently lacks type definitions, which makes it challenging to use in TypeScript projects without relying on custom typings or
any
types. It would be beneficial to include those type definitions either within the package itself or by providing a separate@types/pdf-signatures
package. This enhancement would improve developer experience and integration in TypeScript environments.The text was updated successfully, but these errors were encountered: