Skip to content

Commit 8241749

Browse files
authored
types: creating Teleport with h and RawSlots #2613 (#2614)
1 parent a9e3fa4 commit 8241749

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/runtime-core/src/h.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export function h(
108108
export function h(
109109
type: typeof Teleport,
110110
props: RawProps & TeleportProps,
111-
children: RawChildren
111+
children: RawChildren | RawSlots
112112
): VNode
113113

114114
// suspense

test-dts/h.test-d.ts

+1
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)