(paths: string[])
| 214 | // but they may have left behind side effects that need to be cleaned up |
| 215 | // (e.g. style injections) |
| 216 | public async prunePaths(paths: string[]): Promise<void> { |
| 217 | await Promise.all( |
| 218 | paths.map((path) => { |
| 219 | const disposer = this.disposeMap.get(path) |
| 220 | if (disposer) return disposer(this.dataMap.get(path)) |
| 221 | }), |
| 222 | ) |
| 223 | await Promise.all( |
| 224 | paths.map((path) => { |
| 225 | const fn = this.pruneMap.get(path) |
| 226 | if (fn) { |
| 227 | return fn(this.dataMap.get(path)) |
| 228 | } |
| 229 | }), |
| 230 | ) |
| 231 | } |
| 232 | |
| 233 | protected warnFailedUpdate(err: Error, path: string | string[]): void { |
| 234 | if (!(err instanceof Error) || !err.message.includes('fetch')) { |
no test coverage detected