From a3051fe2207d680508e59a7862c41d19ccb603cd Mon Sep 17 00:00:00 2001 From: Johann Schopplich Date: Mon, 28 Aug 2023 21:50:11 +0200 Subject: [PATCH] fix: local `PDFJS` interface --- src/index.web.ts | 2 ++ src/types.ts | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.web.ts b/src/index.web.ts index c81e612..8003cab 100644 --- a/src/index.web.ts +++ b/src/index.web.ts @@ -10,6 +10,8 @@ export { resolvePDFJSImports, } from "./_utils"; +// TODO: init official PDF.js build for web? + export const getPDFMeta: typeof _getPDFMeta = async (...args) => { await resolvePDFJSImports(); return await _getPDFMeta(...args); diff --git a/src/types.ts b/src/types.ts index 0e2c4be..6d816a5 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,6 @@ -export type PDFJS = any; +import type _PDFJS from "pdfjs-dist/types/src/pdf"; + +export type PDFJS = typeof _PDFJS; export interface UnPDFConfiguration { /**