basaran / svelte-recaptcha-v2

Google reCAPTCHA v2 implementation for Svelte SPA, SSR and sveltekit static sites.
https://basaran.github.io/svelte-recaptcha-v2/demo
MIT License
42 stars 14 forks source link

Could not find a declaration file for module #14

Open KarolusD opened 1 year ago

KarolusD commented 1 year ago

PNPM does not download types, resulting in error:

1. Could not find a declaration file for module 'svelte-recaptcha-v2'. '/path/to/project/node_modules/.pnpm/svelte-recaptcha-v2@0.0.2/node_modules/svelte-recaptcha-v2/dist/index.js' implicitly has an 'any' type.

image

h1dd3nsn1p3r commented 9 months ago

Hi @KarolusD

I created reCaptcha.d.ts file inside my custom types DIR & I added declare module "svelte-recaptcha-v2"; inside it. This worked for me. Do you mind trying?

basaran commented 4 months ago

Hi, a few things have changed since the package last published. I am going to publish a new package hopefully this week which should address the definitions issue.

h1dd3nsn1p3r commented 4 months ago

@basaran Also please include a fix for this warning.

image

Let me know if you need some additional hand.