pqina / svelte-filepond

🔌 A handy FilePond adapter component for Svelte
MIT License
247 stars 10 forks source link

Typescript Support #13

Open AgarwalPragy opened 2 years ago

AgarwalPragy commented 2 years ago

Using svelte-filepond with typescript causes the error Cannot resolve definitions for module 'svelte-filepond'. The type definitions aren't available at @types/svelte-filepond either.

A definitions file will be very helpful. Thanks.

rikschennink commented 2 years ago

Hopefully will add those in the near future, if anyone feels like adding them, a PR is very welcome.

pierre-H commented 1 year ago

Thank you @rikschennink !

tymon3568 commented 1 year ago

I get the same errors and fix by vscode suggestion (the docs in github repo get errors): With import in +page.svelte import FilePond, { registerPlugin, supported } from 'svelte-filepond'; import FilePondPluginImageExifOrientation from 'filepond-plugin-image-exif-orientation'; import FilePondPluginImagePreview from 'filepond-plugin-image-preview'; import 'filepond/dist/filepond.min.css'; import 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css'

in app.d.ts add this line: declare module 'svelte-filepond';

MuellerHF commented 3 months ago

Any news on this? typescript complaining about not having typesupport is annoying