-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
component type error #1996
Comments
回滚volar到1.0.3版本等待解决吧 |
the same problem |
Here is a reproduction repo when open the when the component has both |
same error |
回滚有效, 不过最近volar似乎不是很稳定. |
+1 |
Same here, all my components components with |
+1 |
In my case, these errors appear when calling methods defined via options API, e.g. Side note: The same errors appear also when building with vue-cli as soon as I switch from vue |
Problem (#1996 (comment)) still applies for me even after "fix" with 1.0.6. |
Same case here (the issue still exists): using Volar It compiles and runs fine, it's just complaining about this:
|
The issue is still open Volar ts: 1.2.0 |
@johnsoncodehk this creates massive type errors in vue-tsc 1.3.10, somehow VS Code Volar 1.3.14 doesn't show the errors though. We can't basically use vue-tsc right now, as it emits too many wrong errors, along the lines of (for a component with a simple 'id' prop) showing (only in vue.tsc, not VS Code)
|
BUG report
When <script lang="ts" setup> and normal <script lang="ts"> are used together. it's report:
Type '{}' is not assignable to type 'ComponentProps<() => ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<Readonly<ExtractPropTypes<{}>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 10 more ...; $watch(source: string | Function, cb: Function, options?: WatchOptions<......'.
<!-- ComponentWithMultipleRoots --> <template> <div></div> <div></div> </template> <script lang="ts" setup> //... </script> <script lang="ts"> export default { inheritAttrs: false } </script>
ENV
Typescript version: 4.8.4
vite version: 3.1.7
volar version: 1.0.5
vscode version: 1.72
os: 5.17.15-1-MANJARO(x64)
The text was updated successfully, but these errors were encountered: