vinodnimbalkar/svelte-pdf

Typescript compiler expects data prop

lewisjr opened this issue · 1 comments

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

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;