fix(types): components options should accept components defined with defineComponent (#602)
This commit is contained in:
parent
63a6563106
commit
74baea108a
@ -63,7 +63,10 @@ export interface ComponentOptionsBase<
|
||||
// Luckily `render()` doesn't need any arguments nor does it care about return
|
||||
// type.
|
||||
render?: Function
|
||||
components?: Record<string, Component>
|
||||
components?: Record<
|
||||
string,
|
||||
Component | { new (): ComponentPublicInstance<any, any, any, any, any> }
|
||||
>
|
||||
directives?: Record<string, Directive>
|
||||
inheritAttrs?: boolean
|
||||
|
||||
|
@ -259,3 +259,11 @@ describe('compatibility w/ createApp', () => {
|
||||
})
|
||||
createApp().mount(comp3, '#hello')
|
||||
})
|
||||
|
||||
describe('defineComponent', () => {
|
||||
test('should accept components defined with defineComponent')
|
||||
const comp = defineComponent({})
|
||||
defineComponent({
|
||||
components: { comp }
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user