refactor(types): widen Component type to include consutructor types
returned from `defineComponent` ref: https://github.com/vuejs/vue-router-next/pull/421 also close #1880 Previous `Component` type is now exported as `ConcreteComponent`. This introduces a minor breaking change when calling `h(comp, { ... })` will now fail if `comp` is a of generic `Component` type, since it does not specify what props it expects.
This commit is contained in:
@@ -2,7 +2,7 @@ import { VNode } from './vnode'
|
||||
import {
|
||||
Data,
|
||||
ComponentInternalInstance,
|
||||
Component,
|
||||
ConcreteComponent,
|
||||
formatComponentName
|
||||
} from './component'
|
||||
import { isString, isFunction } from '@vue/shared'
|
||||
@@ -10,7 +10,7 @@ import { toRaw, isRef, pauseTracking, resetTracking } from '@vue/reactivity'
|
||||
import { callWithErrorHandling, ErrorCodes } from './errorHandling'
|
||||
|
||||
type ComponentVNode = VNode & {
|
||||
type: Component
|
||||
type: ConcreteComponent
|
||||
}
|
||||
|
||||
const stack: VNode[] = []
|
||||
|
||||
Reference in New Issue
Block a user