Skip to content

Commit

Permalink
types: creating Teleport with h and RawSlots #2613 (#2614)
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Oct 3, 2022
1 parent a9e3fa4 commit 8241749
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime-core/src/h.ts
Expand Up @@ -108,7 +108,7 @@ export function h(
export function h(
type: typeof Teleport,
props: RawProps & TeleportProps,
children: RawChildren
children: RawChildren | RawSlots
): VNode

// suspense
Expand Down
1 change: 1 addition & 0 deletions test-dts/h.test-d.ts
Expand Up @@ -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
Expand Down

0 comments on commit 8241749

Please sign in to comment.