From b31ff56252479ee7fb375a0df26fc271c9776912 Mon Sep 17 00:00:00 2001 From: Islam Kamel Date: Sun, 29 Dec 2024 11:54:40 +0200 Subject: [PATCH] fix #3012: PDFDownloadLinkProps Type Error --- packages/renderer/index.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/renderer/index.d.ts b/packages/renderer/index.d.ts index bd8058011..4dd4ac16f 100644 --- a/packages/renderer/index.d.ts +++ b/packages/renderer/index.d.ts @@ -496,11 +496,14 @@ declare namespace ReactPDF { export class PDFViewer extends React.Component {} interface PDFDownloadLinkProps - extends Omit, 'href'> { + extends Omit< + React.AnchorHTMLAttributes, + 'href' | 'children' + > { /** PDF filename. Alias for anchor tag `download` attribute. */ fileName?: string; document: React.ReactElement; - children?: React.ReactNode | React.ReactElement; + children?: React.ReactNode | React.FC; onClick?: React.AnchorHTMLAttributes['onClick'] & (( event: React.MouseEvent,