初步可看版本
This commit is contained in:
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
declare module 'react-pdf' {
|
||||
import * as React from 'react';
|
||||
|
||||
interface TextItem {
|
||||
str: string;
|
||||
transform: number[];
|
||||
width: number;
|
||||
height: number;
|
||||
fontName: string;
|
||||
}
|
||||
|
||||
export interface DocumentProps {
|
||||
file: string | Uint8Array | ArrayBuffer;
|
||||
onLoadSuccess?: ({ numPages }: { numPages: number }) => void;
|
||||
onLoadError?: (error: Error) => void;
|
||||
className?: string;
|
||||
error?: React.ReactNode;
|
||||
noData?: React.ReactNode;
|
||||
loading?: React.ReactNode;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export interface PageProps {
|
||||
pageNumber: number;
|
||||
renderTextLayer?: boolean;
|
||||
renderAnnotationLayer?: boolean;
|
||||
className?: string;
|
||||
customTextRenderer?: (textItem: TextItem) => string;
|
||||
}
|
||||
|
||||
export const Document: React.FC<DocumentProps>;
|
||||
export const Page: React.FC<PageProps>;
|
||||
export const pdfjs: {
|
||||
GlobalWorkerOptions: {
|
||||
workerSrc: string;
|
||||
};
|
||||
version: string;
|
||||
};
|
||||
}
|
||||
|
||||
declare module '*.css' {
|
||||
const content: Record<string, string>;
|
||||
export default content;
|
||||
}
|
||||
Reference in New Issue
Block a user