max?: number | string
}
-type CacheKey = string | number | ConcreteComponent
+type CacheKey = string | number | symbol | ConcreteComponent
type Cache = Map<CacheKey, VNode>
type Keys = Set<CacheKey>
const s2 = i // next starting index
// 5.1 build key:index map for newChildren
- const keyToNewIndexMap: Map<string | number, number> = new Map()
+ const keyToNewIndexMap: Map<string | number | symbol, number> = new Map()
for (i = s2; i <= e2; i++) {
const nextChild = (c2[i] = optimized
? cloneIfMounted(c2[i] as VNode)
// https://github.com/microsoft/TypeScript/issues/33099
export type VNodeProps = {
- key?: string | number
+ key?: string | number | symbol
ref?: VNodeRef
// vnode hooks
type: VNodeTypes
props: (VNodeProps & ExtraProps) | null
- key: string | number | null
+ key: string | number | symbol | null
ref: VNodeNormalizedRef | null
/**
* SFC only. This is assigned on vnode creation using currentScopeId