(filter: (name: string) => boolean)
| 201 | } |
| 202 | |
| 203 | function pruneCache(filter: (name: string) => boolean) { |
| 204 | cache.forEach((vnode, key) => { |
| 205 | // for async components, name check should be based in its loaded |
| 206 | // inner component if available |
| 207 | const name = getComponentName( |
| 208 | isAsyncWrapper(vnode) |
| 209 | ? (vnode.type as ComponentOptions).__asyncResolved || {} |
| 210 | : (vnode.type as ConcreteComponent), |
| 211 | ) |
| 212 | if (name && !filter(name)) { |
| 213 | pruneCacheEntry(key) |
| 214 | } |
| 215 | }) |
| 216 | } |
| 217 | |
| 218 | function pruneCacheEntry(key: CacheKey) { |
| 219 | const cached = cache.get(key) as VNode |
no test coverage detected