fix: resolve TypeScript error in PDFDownloadLink component react-pdf v4
Fixed #2886
Changes Made:
- Updated PDFDownloadLinkProps to correctly handle the 'children' prop, allowing for both ReactNode and function types.
- Ensured compatibility with TypeScript type definitions to prevent type mismatches.
- Added necessary type assertions to preserve functionality.
⚠️ No Changeset found
Latest commit: 4a1bdcc68e44c7b96105ca9448ef6e4f7c808a11
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Anything i can do to help speed up this PR?
@diegomura sorry for tagging you
I need this PR to be merged...
This is still an issue in V4.1.5, is there any fix or workaround for this?
This is still an issue in V4.1.5, is there any fix or workaround for this?
yes i still facing this issue. still using @ts-expect-error to ignoring the type errors
There's an open question in this PR I left on code
when will this be merged ?
Up. It is a big issue for all typescript users.
I hope we get this resolved before the end of the year.
@robbycarter @Maquinours
Until it's fixed you can do something like this:
the @ts-expect-error is better than @ts-ignore because when this PR is merged and the error isn't there anymore the @ts-expect-error will throw an error itself saying there are no errors, then you can remove it from your code safely.
Thank you !