svelte-filepond icon indicating copy to clipboard operation
svelte-filepond copied to clipboard

Typescript Support

Open AgarwalPragy opened this issue 1 year ago • 3 comments

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.

AgarwalPragy avatar Jul 13 '22 10:07 AgarwalPragy

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

rikschennink avatar Jul 19 '22 06:07 rikschennink

Thank you @rikschennink !

pierre-H avatar Nov 22 '22 17:11 pierre-H

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';

tymon3568 avatar Dec 05 '22 10:12 tymon3568