refactor(pdf-viewer): export LibLoader type and update callers

Exporting LibLoader gives the type a stable, named identity.
PdfViewer.svelte and PdfViewer.svelte.spec.ts now import it directly
instead of using Parameters<typeof createPdfRenderer>[0].

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-11 23:12:55 +02:00
parent 11c61c8a77
commit e529f9f7d1
3 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
import type { PDFDocumentProxy, RenderTask } from 'pdfjs-dist';
type LibLoader = () => Promise<readonly [typeof import('pdfjs-dist'), { default: string }]>;
export type LibLoader = () => Promise<readonly [typeof import('pdfjs-dist'), { default: string }]>;
const defaultLibLoader: LibLoader = () =>
Promise.all([import('pdfjs-dist'), import('pdfjs-dist/build/pdf.worker.min.mjs?url')]);