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

Interface props isn't exported. #67

Open
juruus opened this issue Jun 23, 2022 · 2 comments
Open

Interface props isn't exported. #67

juruus opened this issue Jun 23, 2022 · 2 comments

Comments

@juruus
Copy link

juruus commented Jun 23, 2022

Description of the bug
When using the vue3-popper in a library that's going to be type defined with vue-tsc then errors occur because vue3-popper uses prop definition that isn't exported.

To Reproduce
Steps to reproduce the behavior:

  1. npm i vue-tsc -D
  2. npx vue-tsc --declaration --emitDeclarationOnly
  3. See error

Expected behavior
Vue3-popper should inline or export Props interface.

Screenshots
This fixes it:
Screenshot 2022-06-23 at 11 42 11

So the fix to the component should be something like this:
Screenshot 2022-06-23 at 11 46 50

Links
https://bytemeta.vip/repo/vuejs/docs/issues/1678
https://vuejs.org/api/sfc-script-setup.html#default-props-values-when-using-type-declaration

@juruus
Copy link
Author

juruus commented Jun 23, 2022

Outcome from vue-tsc, when my PopupMenu component wraps vue3-popper

src/components/PopupMenu/PopupMenu.vue:40:1 - error TS4082: Default export of the module has or is using private name 'Props'.

40 export default defineComponent({
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~

@mortezasabihi
Copy link

I am also looking for a way to import the Props from the vue3-tooltip.

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

2 participants