beyonk-group / gdpr-cookie-consent-banner

A GDPR compliant cookie consent banner implementation
MIT License
248 stars 42 forks source link

Missing TypeScript declaration #38

Closed cloudlena closed 1 year ago

cloudlena commented 2 years ago

It would be great to get TypeScript typings and a declaration for this package. Currently, I'm getting the following error:

Could not find a declaration file for module '@beyonk/gdpr-cookie-consent-banner'. '/home/lena/bespinian/bespinian.io-svelte/node_modules/@beyonk/gdpr-cookie-consent-banner/dist/esm/bund
 le.js' implicitly has an 'any' type.
      Try `npm i --save-dev @types/beyonk__gdpr-cookie-consent-banner` if it exists or add a new declaration (.d.ts) file containing `declare module '@beyonk/gdpr-cookie-consent-banner';`

The workaround with declare module '@beyonk/gdpr-cookie-consent-banner'; works but doesn't provide any typings of, for example, the GdprBanner Svelte component or its options.

antony commented 1 year ago

Closing as I see the PR has been merged - congrats!