fix(types): h support for resolveComponent (#2402)

close #2357
This commit is contained in:
Carlos Rodrigues
2020-10-20 20:56:29 +01:00
committed by GitHub
parent fff62e2ee8
commit 1f2a652a9d
3 changed files with 28 additions and 5 deletions

View File

@@ -8,7 +8,8 @@ import {
Suspense,
Component,
expectError,
expectAssignable
expectAssignable,
resolveComponent
} from './index'
describe('h inference w/ element', () => {
@@ -224,3 +225,11 @@ describe('Boolean prop implicit false', () => {
// @ts-expect-error
expectError(h(RequiredComponent, {}))
})
// #2357
describe('resolveComponent should work', () => {
h(resolveComponent('test'))
h(resolveComponent('test'), {
message: '1'
})
})