Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coponent types missing #429

Open
itpropro opened this issue Apr 19, 2024 · 3 comments
Open

Coponent types missing #429

itpropro opened this issue Apr 19, 2024 · 3 comments

Comments

@itpropro
Copy link

itpropro commented Apr 19, 2024

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.

@gruhn
Copy link
Owner

gruhn commented Apr 19, 2024

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 🙂

@jarekcieslak
Copy link

jarekcieslak commented Apr 19, 2024

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;

@gruhn
Copy link
Owner

gruhn commented Apr 19, 2024

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:

plugins: [vue(), dts()],

Maybe it's struggling with .vue files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants