upatde: json + models
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled

This commit is contained in:
Tom Boullay
2026-05-15 00:18:03 +02:00
parent cdd919c010
commit 27951d13fd
12 changed files with 40939 additions and 39955 deletions
+8
View File
@@ -31,6 +31,10 @@ function isHierarchicalMapNode(value: unknown): value is HierarchicalMapNode {
return false;
}
if ("role" in value && value.role !== undefined && value.role !== "group") {
return false;
}
if (!("children" in value)) {
return true;
}
@@ -52,6 +56,10 @@ function flattenMapNode(node: HierarchicalMapNode): MapNode[] {
};
const childNodes = node.children?.flatMap(flattenMapNode) ?? [];
if (node.role === "group") {
return childNodes;
}
return [mapNode, ...childNodes];
}