refactor(types): widen Component type to include consutructor types
returned from `defineComponent` ref: https://github.com/vuejs/vue-router-next/pull/421 also close #1880 Previous `Component` type is now exported as `ConcreteComponent`. This introduces a minor breaking change when calling `h(comp, { ... })` will now fail if `comp` is a of generic `Component` type, since it does not specify what props it expects.
This commit is contained in:
@@ -11,8 +11,7 @@ import {
|
||||
watch,
|
||||
watchEffect,
|
||||
onUnmounted,
|
||||
onErrorCaptured,
|
||||
Component
|
||||
onErrorCaptured
|
||||
} from '@vue/runtime-test'
|
||||
|
||||
describe('Suspense', () => {
|
||||
@@ -31,7 +30,7 @@ describe('Suspense', () => {
|
||||
setup(props: any, { slots }: any) {
|
||||
const p = new Promise(resolve => {
|
||||
setTimeout(() => {
|
||||
resolve(() => h<Component>(comp, props, slots))
|
||||
resolve(() => h(comp, props, slots))
|
||||
}, delay)
|
||||
})
|
||||
// in Node 12, due to timer/nextTick mechanism change, we have to wait
|
||||
|
||||
Reference in New Issue
Block a user