mirror of https://github.com/vuejs/core.git
feat(types): add slots types for built-in components (#6033)
This commit is contained in:
parent
1b1242f4d1
commit
3cb4dc9e55
|
@ -283,6 +283,9 @@ if (__COMPAT__) {
|
|||
export const BaseTransition = BaseTransitionImpl as unknown as {
|
||||
new (): {
|
||||
$props: BaseTransitionProps<any>
|
||||
$slots: {
|
||||
default(): VNode[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -344,6 +344,9 @@ export const KeepAlive = KeepAliveImpl as any as {
|
|||
__isKeepAlive: true
|
||||
new (): {
|
||||
$props: VNodeProps & KeepAliveProps
|
||||
$slots: {
|
||||
default(): VNode[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,13 @@ export const Suspense = (__FEATURE_SUSPENSE__
|
|||
? SuspenseImpl
|
||||
: null) as unknown as {
|
||||
__isSuspense: true
|
||||
new (): { $props: VNodeProps & SuspenseProps }
|
||||
new (): {
|
||||
$props: VNodeProps & SuspenseProps
|
||||
$slots: {
|
||||
default(): VNode[]
|
||||
fallback(): VNode[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function triggerEvent(
|
||||
|
|
|
@ -393,7 +393,12 @@ function hydrateTeleport(
|
|||
// Force-casted public typing for h and TSX props inference
|
||||
export const Teleport = TeleportImpl as unknown as {
|
||||
__isTeleport: true
|
||||
new (): { $props: VNodeProps & TeleportProps }
|
||||
new(): {
|
||||
$props: VNodeProps & TeleportProps
|
||||
$slots: {
|
||||
default(): VNode[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateCssVars(vnode: VNode) {
|
||||
|
|
Loading…
Reference in New Issue