fix(types): make return type of defineComponent assignable to Component type (#1032)

fix #993
This commit is contained in:
Carlos Rodrigues
2020-04-24 18:22:58 +01:00
committed by GitHub
parent 28b4c317b4
commit f3a9b516bd
4 changed files with 49 additions and 10 deletions

View File

@@ -11,7 +11,8 @@ import {
watch,
watchEffect,
onUnmounted,
onErrorCaptured
onErrorCaptured,
Component
} from '@vue/runtime-test'
describe('Suspense', () => {
@@ -30,7 +31,7 @@ describe('Suspense', () => {
setup(props: any, { slots }: any) {
const p = new Promise(resolve => {
setTimeout(() => {
resolve(() => h(comp, props, slots))
resolve(() => h<Component>(comp, props, slots))
}, delay)
})
// in Node 12, due to timer/nextTick mechanism change, we have to wait