import type { GlobalState, TabArgs } from '../types'; import { getCurrentTabId } from '../../util/establishMultitabRole'; import { selectTabState } from './tabs'; export function selectCurrentGlobalSearchQuery( global: T, ...[tabId = getCurrentTabId()]: TabArgs ) { return selectTabState(global, tabId).globalSearch.query; }