UNPKG

@launchmenu/applet-dictionary

Version:
39 lines 1.66 kB
import { IDataHook } from "model-react"; import { ILanguage } from "./_types/ILanguage"; import { IWordData } from "./_types/IWordData"; /** * A simple wiktionary API to retrieve words */ export declare namespace Wiktionary { /** * Retrieves all definitions for the given word in a given language * @param term The word to retrieve the definitions for * @param language The language for which to retrieve the definitions * @param hook The hook to subscribe to changes * @returns The retrieved data */ function get(term: string, language: ILanguage, hook?: IDataHook): IWordData[]; /** * Retrieves all definitions for the given word * @param term The word to retrieve the definitions for * @param hook The hook to subscribe to changes * @returns The retrieved data */ function getAll(term: string, hook?: IDataHook): IWordData[]; /** * Retrieves all results for a given search term in a given language (applying autocorrection) * @param term The term to search for * @param language The language of the term to retrieve * @param hook The hook to subscribe to changes * @returns The search results */ function search(term: string, language: ILanguage, hook?: IDataHook): string[]; /** * Retrieves all results for a given search term (applying autocorrection) * @param term The term to search for * @param hook The hook to subscribe to changes * @returns The search results */ function searchAll(term: string, hook?: IDataHook): string[]; } //# sourceMappingURL=Wiktionary.d.ts.map