|
@@ -12,6 +12,7 @@ import { isObject, isArray } from '@vue/shared'
|
|
|
import { RawSlots } from './componentSlots'
|
|
import { RawSlots } from './componentSlots'
|
|
|
import { FunctionalComponent, Component } from './component'
|
|
import { FunctionalComponent, Component } from './component'
|
|
|
import { ComponentOptions } from './componentOptions'
|
|
import { ComponentOptions } from './componentOptions'
|
|
|
|
|
+import { EmitsOptions } from './componentEmits'
|
|
|
|
|
|
|
|
// `h` is a more user-friendly version of `createVNode` that allows omitting the
|
|
// `h` is a more user-friendly version of `createVNode` that allows omitting the
|
|
|
// props when possible. It is intended for manually written render functions.
|
|
// props when possible. It is intended for manually written render functions.
|
|
@@ -107,8 +108,8 @@ export function h(
|
|
|
): VNode
|
|
): VNode
|
|
|
|
|
|
|
|
// functional component
|
|
// functional component
|
|
|
-export function h<P>(
|
|
|
|
|
- type: FunctionalComponent<P>,
|
|
|
|
|
|
|
+export function h<P, E extends EmitsOptions = {}>(
|
|
|
|
|
+ type: FunctionalComponent<P, E>,
|
|
|
props?: (RawProps & P) | ({} extends P ? null : never),
|
|
props?: (RawProps & P) | ({} extends P ? null : never),
|
|
|
children?: RawChildren | RawSlots
|
|
children?: RawChildren | RawSlots
|
|
|
): VNode
|
|
): VNode
|