diff --git a/packages/amis-ui/src/components/PdfViewer.tsx b/packages/amis-ui/src/components/PdfViewer.tsx index 36544d785..85d99d78a 100644 --- a/packages/amis-ui/src/components/PdfViewer.tsx +++ b/packages/amis-ui/src/components/PdfViewer.tsx @@ -11,7 +11,6 @@ import {Document, Page, pdfjs} from 'react-pdf'; import {Icon} from './icons'; import Input from './Input'; import Spinner from './Spinner'; -// @ts-ignore import pdfJSWorkerURL from 'pdfjs-dist/build/pdf.worker.min'; pdfjs.GlobalWorkerOptions.workerSrc = pdfJSWorkerURL; diff --git a/types/pdfjs-dist/index.d.ts b/types/pdfjs-dist/index.d.ts new file mode 100644 index 000000000..23954727e --- /dev/null +++ b/types/pdfjs-dist/index.d.ts @@ -0,0 +1 @@ +declare module 'pdfjs-dist/build/pdf.worker.min';