import { TabOption } from '../types'; export function isTabVisible( tab: TabOption, visKey: Vis | 'default' ): boolean { if (typeof tab.visible === 'boolean') { return tab.visible; } if (typeof tab.visible === 'object' && tab.visible) { return !!tab.visible[visKey]; } return true; }