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

组件类型推导出错 #1997

Closed
feiYouLian opened this issue Oct 12, 2022 · 1 comment
Closed

组件类型推导出错 #1997

feiYouLian opened this issue Oct 12, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@feiYouLian
Copy link

// HelloWorld.vue 添加
<script lang="ts">
export default {
  inheritAttrs: false,
};
</script>
// App.vue 使用
<template>
  <HelloWorld ref="xxx" msg="Vite + Vue" />
</template>

HelloWorld 类型推导错误,报错信息
Type '{ ref: string; msg: string; }' is not assignable to type 'ComponentProps<() => ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{ msg: string; }>>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 10 more ...; $watch(source: string | Funct...'.

@johnsoncodehk
Copy link
Member

Duplicate of #1996

@johnsoncodehk johnsoncodehk marked this as a duplicate of #1996 Oct 12, 2022
@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants