import * as H from 'history'; import { SearchOptions } from '.'; import * as GQL from '../backend/graphqlschema'; export declare function submitSearch(history: H.History, options: SearchOptions, source: 'home' | 'nav' | 'repo' | 'tree' | 'filter'): void; /** * Returns the index that a given search scope occurs in a given search query. * Attempts to not match a scope that is a substring of another scope. * * @param query The full query string * @param scope A scope (sub query) that is searched for in `query` * @returns The index in `query`, or `-1` if not found */ export declare function queryIndexOfScope(query: string, scope: string): number; /** * Toggles the given search scope by adding or removing it from the current * user query string. * * @param query The current user query. * @param searchFilter The search scope (sub query) or dynamic filter to toggle (add/remove) from the current user query. * @returns The new query. */ export declare function toggleSearchFilter(query: string, searchFilter: string): string; /** Returns true if the given value is of the GraphQL SearchResults type */ export declare const isSearchResults: (val: any) => val is GQL.ISearchResults; //# sourceMappingURL=helpers.d.ts.map