vinodnimbalkar / svelte-pdf

svelte-pdf provides a component for rendering PDF documents using PDF.js
https://www.npmjs.com/package/svelte-pdf
MIT License
196 stars 47 forks source link

Typescript compiler expects data prop #86

Open lewisjr opened 1 month ago

lewisjr commented 1 month ago

When importing svelte-pdf as per the docs, typescript flags my <PdfViewer {url} /> and expects me to add the data prop. Please fix as the docs state that this is not required.

I'm using svelte-pdf v1.0.20

lewisjr commented 1 month ago

Found the solution, in PdfViewer.svelte, change line 8 from:

export let data;

to

export let data = undefined;

which should update the PdfViewer.svelte.d.ts lines 5 and 26 to data?: any;