-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
[ADVICE] default as import of defineComponent() has broken typing #3726
Comments
Hello @michealroberts, are you using javascript not typescript? |
@so1ve Hey Ray. TypeScript => the @vue-flow/background package is compiled to js but has the exported types, it's just that they imports are not typed in any way ... |
Ah - I see. This is actually a display issue, if you try access some properties such as |
@so1ve But on the template, we don't get any type inference from Volar at all. We don't see what props are required or what props are possible ... |
Which version are you using? |
|
Someone told me that |
Hey Ray, damn - still no luck. The repo uses “shamefully-hoist”, and we’re mixing Vue major versions. Could this be the issue? |
Mixing Vue major versions could be the root cause - could you please provide a minimal reproduction to help us investigate? Thanks a lot! |
@so1ve Sure -> this MR here on this branch should be enough to investigate: bcakmakoglu/vue-flow#1188 Let me know if you need anything else ... |
Hey @so1ve - apologies for bugging, but I wondered if you managed to look at this? |
Sorry, missed your reply 🥹 I'll check it now |
Cool, is that inside the project? Looks to be working well ... |
@so1ve What is your setup? Volar seems to complain for me regarding @vue/runtime-core:
|
I simply cloned the repository, checkout your PR, and then build the types. I use Vue Language Tools 1.8.23 |
@so1ve Could you double check this for me, I'm not convinced because the current master branch works but that PR doesn't. I am using Vue Language Tools 1.8.23 pre-release and I have built the types but I am not seeing any type hints at all. |
I just wanted to understand an issue I am seeing, I'm 99% sure it is not Volar throwing any tricks but just wanted to understand the overall reason why a
defineComponent
is being typed as any.We have a monorepo setup => whereby the package in question is reliant on vue-demi, the defined component is like:
This is then exported from the package's entrypoint as:
It's the same if I use the export default directly:
However, the imported type from a corresponding package seems to be "any":
Does anyone know a trick or something I could do to get this working correctly? 🤔
The text was updated successfully, but these errors were encountered: