Skip to content

Commit acf2844

Browse files
committed
types: creating Teleport with h and RawSlots
types: creating Teleport with h and RawSlots test: add type test
1 parent fbf2d68 commit acf2844

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/runtime-core/src/h.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export function h(
9696
export function h(
9797
type: typeof Teleport,
9898
props: RawProps & TeleportProps,
99-
children: RawChildren
99+
children: RawChildren | RawSlots
100100
): VNode
101101

102102
// suspense

test-dts/h.test-d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ describe('h inference w/ Fragment', () => {
4747

4848
describe('h inference w/ Teleport', () => {
4949
h(Teleport, { to: '#foo' }, 'hello')
50+
h(Teleport, { to: '#foo' }, { default() {} })
5051
// @ts-expect-error
5152
expectError(h(Teleport))
5253
// @ts-expect-error

0 commit comments

Comments
 (0)