1
0
mirror of https://github.com/flarum/core.git synced 2025-08-07 08:56:38 +02:00
Files
php-flarum/js/dist-typings/forum/states/SearchState.d.ts
flarum-bot c3a684c7ed Bundled output for commit 3537f76eab
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-05-12 23:29:46 +00:00

31 lines
919 B
TypeScript

export default class SearchState {
protected cachedSearches: Set<string>;
protected value: string;
constructor(cachedSearches?: string[]);
/**
* If we are displaying the full results of a search (not just a preview),
* this value should return the query that prompted that search.
*
* In this generic class, full page searching is not supported.
* This method should be implemented by subclasses that do support it.
*
* @see Search
*/
getInitialSearch(): string;
getValue(): string;
setValue(value: string): void;
/**
* Clear the search value.
*/
clear(): void;
/**
* Mark that we have already searched for this query so that we don't
* have to ping the endpoint again.
*/
cache(query: string): void;
/**
* Check if this query has been searched before.
*/
isCached(query: string): boolean;
}