types: creating Teleport with h and RawSlots #2613 (#2614)

This commit is contained in:
edison 2022-10-03 16:40:37 +08:00 committed by GitHub
parent a9e3fa4e21
commit 824174915f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -108,7 +108,7 @@ export function h(
export function h(
type: typeof Teleport,
props: RawProps & TeleportProps,
children: RawChildren
children: RawChildren | RawSlots
): VNode
// suspense

View File

@ -47,6 +47,7 @@ describe('h inference w/ Fragment', () => {
describe('h inference w/ Teleport', () => {
h(Teleport, { to: '#foo' }, 'hello')
h(Teleport, { to: '#foo' }, { default() {} })
// @ts-expect-error
expectError(h(Teleport))
// @ts-expect-error