(id: string)
| 23 | if (!rootId) return []; |
| 24 | |
| 25 | const seen = new Set<string>(); |
| 26 | const walk = (id: string) => { |
| 27 | if (seen.has(id)) return; |
| 28 | seen.add(id); |
| 29 | const value = blocks[id]?.value; |
| 30 | if (!value) return; |
| 31 | if (id !== rootId && (value.type === "page" || value.type === "collection_view_page")) return; |
| 32 | if (Array.isArray(value.content)) { |
| 33 | for (const childId of value.content) walk(childId); |
| 34 | } |
| 35 | const refId = value.format?.transclusion_reference_pointer?.id; |
| 36 | if (refId) walk(refId); |
| 37 | }; |
| 38 | walk(rootId); |
| 39 | return Array.from(seen); |
no outgoing calls
no test coverage detected