vue-qrcode-reader icon indicating copy to clipboard operation
vue-qrcode-reader copied to clipboard

Coponent types missing

Open itpropro opened this issue 2 years ago • 4 comments

Thanks for this library, it works great! The exposed components all seem to miss typings (all any). There is also a closed issue (#390), that states that since 5.5.0 all component types are missing (although I don't know what is referred to with 5.5.0...). The examples on the docs site are also not typed, which makes it hard to integrate the module correctly (for example onDetect, paintOutline or onError). It would be great if you can include the types in the bundle again and maybe update the docs to reflect correct usage of the respective types for integrating the library.

itpropro avatar Apr 19 '24 01:04 itpropro

although I don't know what is referred to with 5.5.0...

That's a legit version. Maybe confusing because the most recently released version (v3.2.0) is not the most recent version (v5.5.3). v3.2.0 was a minor update for a legacy version (that still has Vue 2 support): https://github.com/gruhn/vue-qrcode-reader/releases

It would be great if you can include the types in the bundle again and maybe update the docs to reflect correct usage of the respective types for integrating the library.

I agree. But I'm very confused by the interplay of NPM+TypeScript+Vite. If you know to properly configure this and would like to help, I'd gladly merge your PR 🙂

gruhn avatar Apr 19 '24 11:04 gruhn

I can confirm that something is off with the types. They are no longer exported e.g.dist/components/QrcodeStream.vue.d.ts:

declare const _default: any;
export default _default;

jarekcieslak avatar Apr 19 '24 15:04 jarekcieslak

Yeah, I don't know why there are no proper .d.ts files. In principle vite-plugin-dts should take care of that I guess: https://github.com/gruhn/vue-qrcode-reader/blob/8eb06023434892ffc01259403ce9415c0cd63a8a/vite.config.ts#L44 Maybe it's struggling with .vue files.

gruhn avatar Apr 19 '24 16:04 gruhn

This issue has been marked as stale. If there is no further activity it will be closed.

github-actions[bot] avatar Jun 19 '24 00:06 github-actions[bot]

:tada: This issue has been resolved in version 5.5.10 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Sep 23 '24 09:09 github-actions[bot]