-
-
Notifications
You must be signed in to change notification settings - Fork 502
Closed as not planned
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Link to minimal reproduction
Steps to reproduce
<!-- Foo.vue -->
<script lang="ts" setup generic="T extends object">
defineProps<{
rows?: T[];
}>();
</script>
<template>
<div>Foo</div>
</template><!-- App.vue -->
<script lang="ts" setup>
import Foo from './components/Foo.vue';
type FooInstance = InstanceType<typeof Foo>;
</script>$ npm run build
> vite-vue-typescript-starter@0.0.0 build
> vue-tsc && vite build
src/App.vue:5:33 - error TS2344: Type '<T extends object>(__VLS_props: { rows?: T[] | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: Pick<...> | undefined, __VLS_setup?: { ...; }) => VNode<...> & { ...; }' does not satisfy the constraint 'abstract new (...args: any) => any'.
Type '<T extends object>(__VLS_props: { rows?: T[] | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: Pick<...> | undefined, __VLS_setup?: { ...; }) => VNode<...> & { ...; }' provides no match for the signature 'new (...args: any): any'.
5 type FooInstance = InstanceType<typeof Foo>;Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists