Skip to content

Commit

Permalink
types(runtime-core): fix types of block creation
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianSpeitel committed Aug 21, 2021
1 parent 4adc504 commit db2365e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/helpers/renderSlot.ts
Expand Up @@ -14,7 +14,7 @@ import {
} from '../vnode'
import { PatchFlags, SlotFlags } from '@vue/shared'
import { warn } from '../warning'
import { createVNode } from '@vue/runtime-core'
import { createVNode, VNodeProps } from '@vue/runtime-core'

/**
* Compiler runtime helper for rendering `<slot/>`
Expand All @@ -23,7 +23,7 @@ import { createVNode } from '@vue/runtime-core'
export function renderSlot(
slots: Slots,
name: string,
props: Data = {},
props: Data & VNodeProps = {},
// this is not a user-facing function, so the fallback is always generated by
// the compiler and guaranteed to be a function returning an array
fallback?: () => VNodeArrayChildren,
Expand Down
18 changes: 9 additions & 9 deletions packages/runtime-core/src/vnode.ts
Expand Up @@ -286,12 +286,12 @@ function setupBlock(vnode: VNode) {
* @private
*/
export function createElementBlock(
type: string,
props?: Record<string, any> | null,
children?: any,
type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT,
props?: (Data & VNodeProps) | null,
children?: unknown,
patchFlag?: number,
dynamicProps?: string[],
shapeFlag?: number
dynamicProps?: string[] | null,
shapeFlag?: number | ShapeFlags
) {
return setupBlock(
createBaseVNode(
Expand All @@ -314,11 +314,11 @@ export function createElementBlock(
* @private
*/
export function createBlock(
type: VNodeTypes | ClassComponent,
props?: Record<string, any> | null,
children?: any,
type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT,
props?: (Data & VNodeProps) | null,
children?: unknown,
patchFlag?: number,
dynamicProps?: string[]
dynamicProps?: string[] | null
): VNode {
return setupBlock(
createVNode(
Expand Down

0 comments on commit db2365e

Please sign in to comment.