fix: fix h signature for suspense

This commit is contained in:
Evan You
2019-10-29 14:04:44 -04:00
parent ea2e2ce5bd
commit 083296ead6
3 changed files with 25 additions and 9 deletions

View File

@@ -5,7 +5,8 @@ import {
VNodeChildren,
Fragment,
Portal,
isVNode
isVNode,
Suspense
} from './vnode'
import { isObject, isArray } from '@vue/shared'
import { Ref } from '@vue/reactivity'
@@ -102,6 +103,19 @@ export function h(
children?: RawChildren
): VNode
// suspense
export function h(type: typeof Suspense, children?: RawChildren): VNode
export function h(
type: typeof Suspense,
props?:
| (RawProps & {
onResolve?: () => void
onRecede?: () => void
})
| null,
children?: RawChildren | RawSlots
): VNode
// functional component
export function h(type: FunctionalComponent, children?: RawChildren): VNode
export function h<P>(