types: fix types
This commit is contained in:
parent
66ecd8b47f
commit
5cdeeaa702
@ -73,7 +73,6 @@ export interface ComponentOptionsBase<
|
|||||||
__isFragment?: never
|
__isFragment?: never
|
||||||
__isPortal?: never
|
__isPortal?: never
|
||||||
__isSuspense?: never
|
__isSuspense?: never
|
||||||
__isKeepAlive?: never
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ComponentOptionsWithoutProps<
|
export type ComponentOptionsWithoutProps<
|
||||||
|
@ -145,7 +145,7 @@ export function createComponentInstance(
|
|||||||
vnode,
|
vnode,
|
||||||
parent,
|
parent,
|
||||||
appContext,
|
appContext,
|
||||||
type: vnode.type,
|
type: vnode.type as Component,
|
||||||
root: null!, // set later so it can point to itself
|
root: null!, // set later so it can point to itself
|
||||||
next: null,
|
next: null,
|
||||||
subTree: null!, // will be set synchronously right after creation
|
subTree: null!, // will be set synchronously right after creation
|
||||||
|
@ -100,7 +100,7 @@ export const KeepAlive = {
|
|||||||
|
|
||||||
function pruneCache(filter?: (name: string) => boolean) {
|
function pruneCache(filter?: (name: string) => boolean) {
|
||||||
cache.forEach((vnode, key) => {
|
cache.forEach((vnode, key) => {
|
||||||
const name = getName(vnode.type)
|
const name = getName(vnode.type as Component)
|
||||||
if (name && (!filter || !filter(name))) {
|
if (name && (!filter || !filter(name))) {
|
||||||
pruneCacheEntry(key)
|
pruneCacheEntry(key)
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ type TraceEntry = {
|
|||||||
|
|
||||||
type ComponentTraceStack = TraceEntry[]
|
type ComponentTraceStack = TraceEntry[]
|
||||||
|
|
||||||
export function pushWarningContext(vnode: ComponentVNode) {
|
export function pushWarningContext(vnode: VNode) {
|
||||||
stack.push(vnode)
|
stack.push(vnode)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ function getComponentTrace(): ComponentTraceStack {
|
|||||||
last.recurseCount++
|
last.recurseCount++
|
||||||
} else {
|
} else {
|
||||||
normalizedStack.push({
|
normalizedStack.push({
|
||||||
vnode: currentVNode,
|
vnode: currentVNode as ComponentVNode,
|
||||||
recurseCount: 0
|
recurseCount: 0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user