优化 pdfjs-dist 声明

This commit is contained in:
yupeng12 2024-05-29 15:36:55 +08:00
parent c32d1db014
commit e4b2c66f9a
2 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,6 @@ import {Document, Page, pdfjs} from 'react-pdf';
import {Icon} from './icons'; import {Icon} from './icons';
import Input from './Input'; import Input from './Input';
import Spinner from './Spinner'; import Spinner from './Spinner';
// @ts-ignore
import pdfJSWorkerURL from 'pdfjs-dist/build/pdf.worker.min'; import pdfJSWorkerURL from 'pdfjs-dist/build/pdf.worker.min';
pdfjs.GlobalWorkerOptions.workerSrc = pdfJSWorkerURL; pdfjs.GlobalWorkerOptions.workerSrc = pdfJSWorkerURL;

1
types/pdfjs-dist/index.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare module 'pdfjs-dist/build/pdf.worker.min';