-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Description
Vue version
3.3.1
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-qly3ag?file=src%2FApp.vue,package.json&terminal=dev
Steps to reproduce
Expected "}" but found ":"
4 | __name: 'App',
5 | props: {
6 | onUpdate:value: { type: Function, required: true }
| ^
7 | },
8 | setup(__props: any, { expose: __expose }) {
What is expected?
Generate correct code
What is actually happening?
Generate wrong code
System Info
No response
Any additional comments?
I want to extends Select
component of ant-design-vue
, then I try to use like this:
import type { SelectProps } from 'ant-design-vue'
export interface ApiSelectProps extends SelectProps {
api?: () => Promise<SelectProps['options']>
}
const props = defineProps<ApiSelectProps>()
Workaround:
import type { SelectProps } from 'ant-design-vue'
import { selectProps } from 'ant-design-vue/es/select'
export interface ApiSelectProps extends SelectProps {
api?: () => Promise<SelectProps['options']>
}
const props = defineProps({
...selectProps(),
api: {
type: Function as PropType<NonNullable<ApiSelectProps['api']>>,
},
})
Metadata
Metadata
Assignees
Labels
No labels