Skip to content

Commit

Permalink
fix: make options in usePDF optional in TypeScript (diegomura#2522)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj authored and mskec committed Feb 26, 2024
1 parent 4e878c8 commit cb583c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/polite-panthers-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@react-pdf/renderer': patch
---

Make options in usePDF optional in TypeScript
2 changes: 1 addition & 1 deletion packages/renderer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ declare namespace ReactPDF {
* React hook for creating and updating a PDF document instance
* @platform web
*/
function usePDF(options: {
function usePDF(options?: {
document?: React.ReactElement<DocumentProps>;
}): [
UsePDFInstance,
Expand Down

0 comments on commit cb583c5

Please sign in to comment.