Method
find
(
page: Page,
filter: (item: WithSymbolId<T>) => boolean,
)
Source from the content-addressed store, hash-verified
| 202 | } |
| 203 | |
| 204 | find( |
| 205 | page: Page, |
| 206 | filter: (item: WithSymbolId<T>) => boolean, |
| 207 | ): WithSymbolId<T> | undefined { |
| 208 | const navigations = this.storage.get(page); |
| 209 | if (!navigations) { |
| 210 | return; |
| 211 | } |
| 212 | |
| 213 | for (const navigation of navigations) { |
| 214 | const item = navigation.find(filter); |
| 215 | if (item) { |
| 216 | return item; |
| 217 | } |
| 218 | } |
| 219 | return; |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | export class ConsoleCollector extends PageCollector< |