pstanoev / simple-svelte-autocomplete

Simple Autocomplete / typeahead component for Svelte
http://simple-svelte-autocomplete.surge.sh/
MIT License
464 stars 78 forks source link

Cannot find declaration file #195

Open bmccorm2 opened 1 year ago

bmccorm2 commented 1 year ago

Hi all - whenever i declare this component i get this typescript error. Anyway know how to make it go away? I've created a types.d.ts file and put the recommended text in there to no avail.

import AutoComplete from "simple-svelte-autocomplete";

Could not find a declaration file for module 'simple-svelte-autocomplete'. 'C:/VSO/esgTemplate/node_modules/.pnpm/simple-svelte-autocomplete@2.4.0/node_modules/simple-svelte-autocomplete/dist/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/simple-svelte-autocomplete if it exists or add a new declaration (.d.ts) file containing declare module 'simple-svelte-autocomplete';ts(7016)

pimpelsang commented 1 year ago

same problem, fix it pls :)

ericwooley commented 1 year ago

@pimpelsang

same problem, fix it pls :)

@pstanoev doesn't work for you, or owe you anything. If it's important to you, open a pull request, or contribute to definitely typed.

In the mean time, you all can use // @ts-ignore above the line that errors.

risalfajar commented 1 year ago

That happens because the lib hasn't supported TypeScript yet.

Hope anyone can add it soon since TS is very common nowadays.

risalfajar commented 1 year ago

@pstanoev Do you have any plan for this?

I've tried to use Sveld to generate the types, but I can't get it to work.