Skip to content

Commit

Permalink
chore: remove @ts-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
islam-kamel committed Nov 30, 2024
1 parent 2d9f47d commit 4a1bdcc
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions packages/renderer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
/* eslint-disable max-classes-per-file */
import * as React from 'react';
import {
Style,
PageSize,
Bookmark,
FontStore,
PDFVersion,
Orientation,
SourceObject,
HyphenationCallback,
SVGPresentationAttributes,
Bookmark,
Orientation,
PageLayout,
PageMode,
PageSize,
PDFVersion,
SourceObject,
Style,
SVGPresentationAttributes,
} from '@react-pdf/types';

declare class ReactPDF {
Expand All @@ -28,6 +28,7 @@ declare namespace ReactPDF {
interface Styles {
[key: string]: Style;
}

interface OnRenderProps {
blob?: Blob;
}
Expand Down Expand Up @@ -466,6 +467,7 @@ declare namespace ReactPDF {
loading: boolean;
error: Error | null;
}

interface BlobProviderProps {
document: React.ReactElement<DocumentProps>;
children: (params: BlobProviderParams) => React.ReactNode;
Expand Down Expand Up @@ -495,15 +497,18 @@ declare namespace ReactPDF {
*/
export class PDFViewer extends React.Component<PDFViewerProps> {}

// @ts-ignore
interface PDFDownloadLinkProps
extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
extends Omit<
React.AnchorHTMLAttributes<HTMLAnchorElement>,
'href' | 'children'
> {
/** PDF filename. Alias for anchor tag `download` attribute. */
fileName?: string;
document: React.ReactElement<DocumentProps>;
children?:
| React.ReactNode
| ((props: BlobProviderParams) => React.ReactNode);
| React.ReactElement<BlobProviderProps>
| ((params: BlobProviderParams) => React.ReactNode);
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
((
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
Expand Down

0 comments on commit 4a1bdcc

Please sign in to comment.