Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript compiler expects data prop #86

Open
lewisjr opened this issue May 27, 2024 · 1 comment
Open

Typescript compiler expects data prop #86

lewisjr opened this issue May 27, 2024 · 1 comment

Comments

@lewisjr
Copy link

lewisjr commented May 27, 2024

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
Copy link
Author

lewisjr commented May 27, 2024

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant