export type Tab = { title: string, key: string, icon?: string, class?: string, } export type RouterTab = Tab & { route: { name: string, hash?: string, }, } export function isRouterTab(input: Tab | RouterTab): input is RouterTab { const routerTab = input as RouterTab return !!routerTab.route } type WithCount = T & { count: number | null, } export type ListTab = WithCount export type ListRouterTab = WithCount