Component type resolution fails including Vue types #2111
Replies: 5 comments
-
What version of Vue? Do you have a reproduction I could look at by chance? |
Beta Was this translation helpful? Give feedback.
-
We're on Vue 2.7.14 |
Beta Was this translation helpful? Give feedback.
-
Just realized Vue version wont matter, its probably more dependent on your typescript version. What version of TypeScript are you on? |
Beta Was this translation helpful? Give feedback.
-
We're on 4.6.4
|
Beta Was this translation helpful? Give feedback.
-
I was doing some digging and it looks like the syntax being used is the "Type Only" import found here, so it is correct usage but I am wrestling with an error where TS claims it Possibly an issue with the I'm running TS v5.6.2 |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
On version
2.15.1
including TS types as recommended in the Vue setup e.g."types": ["webpack-env", "jest", "vuetify", "@shoelace-style/shoelace/dist/types/vue"],
eslint is unable to resolve:
The errors seem correct; the generated Vue type file imports component type as named rather than default exports:
import type { SlAnimation } from "../../components/animation/animation.component.js";
but
animation.componnet.js
exports the component as defaultI did notice in our pnpm-lock the package is noted as:
To Reproduce
Steps to reproduce the behavior:
Demo
If the bug isn't obvious, please provide a link to a CodePen or Fiddle with a minimal reproduction. Bugs that have repros get attention faster than those that don't.
Tip: use the CodePen button on any example in the docs!
Screenshots
If applicable, add screenshots to help explain the bug.
Browser / OS
Additional information
Provide any additional information about the bug here.
Beta Was this translation helpful? Give feedback.
All reactions