import type { VHeaderNav } from '../../../cache'; export function mineNavs(navs: VHeaderNav[]) { return navs .filter((topic: VHeaderNav) => { topic.children = topic.children.filter((child: VHeaderNav) => { return child.auth; }); return topic; }) .filter((topic: VHeaderNav) => { return topic.children.length > 0; }); }