@launchmenu/applet-dictionary
Version:
An applet to find dictionary definitions
31 lines • 953 B
TypeScript
import { WikiPage } from "./WikiPage";
/**
* The main entry to the wiktionary
*/
export declare class Wiki<T extends WikiPage = WikiPage> {
protected createPage: (name: string) => T;
protected domain: string;
/**
* Creates a new local model of a wiki
* @param domain The domain of the wiki
* @param createPage The function to create a new page given the page's name
*/
constructor(domain: string, createPage?: (name: string) => T);
/**
* Retrieves the domain that this wiki is for
* @returns The domain
*/
getDomain(): string;
/**
* Retrieves the api url of the wiki
* @returns The api url
*/
getApiUrl(): string;
/**
* Retrieves the found pages for a given search term
* @param query The term to search for
* @returns The found pages
*/
search(query: string): Promise<T[]>;
}
//# sourceMappingURL=Wiki.d.ts.map