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
Describe the bug
Encountering a TypeScript error TS2769: No overload matches this call when using PDFDownloadLink. The error suggests that the provided ({loading}: { loading: any; }) => Element is not assignable to the expected type ReactNode | ReactElement<BlobProviderParams, string | JSXElementConstructor<any>>.
TS2769: No overload matches this call.
Overload 1 of 2,
(props: PDFDownloadLinkProps | Readonly<PDFDownloadLinkProps>): PDFDownloadLink,
gave the following error.
Type ({loading}: { loading: any; }) => Element is not assignable to type
ReactNode | ReactElement<BlobProviderParams, string | JSXElementConstructor<any>>.
Overload 2 of 2,
(props: PDFDownloadLinkProps, context: any): PDFDownloadLink,
gave the following error.
Type ({loading}: { loading: any; }) => Element is not assignable to type
ReactNode | ReactElement<BlobProviderParams, string | JSXElementConstructor<any>>.
Expected behavior
The PDFDownloadLink should correctly accept the child render function and render "Loading..." while the document is being prepared or "Download PDF" when ready.
Screenshots
Desktop (please complete the following information):
OS: [Windows]
Browser: [Edge]
React-pdf version: [4.1.6]
TypeScript version: [5.6.2]
The text was updated successfully, but these errors were encountered:
Describe the bug
Encountering a TypeScript error
TS2769: No overload matches this call
when usingPDFDownloadLink
. The error suggests that the provided({loading}: { loading: any; }) => Element
is not assignable to the expected typeReactNode | ReactElement<BlobProviderParams, string | JSXElementConstructor<any>>
.To Reproduce
Steps to reproduce the behavior:
Use
PDFDownloadLink
with the following setup:Run
tsc
or start the application.Observe the TypeScript error:
Expected behavior
The
PDFDownloadLink
should correctly accept the child render function and render "Loading..." while the document is being prepared or "Download PDF" when ready.Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: