Skip to content

dictApi

This file contains functions for querying the dictionary API.

Functions

apiWildcardQuery()

function apiWildcardQuery(pattern): Promise<DictWildcardLookup>;

Defined in: src/services/dictApi.ts:27

Queries the dictionary API for a wildcard pattern.

Parameters

Parameter Type Description
pattern string The pattern to query.

Returns

Promise\<DictWildcardLookup>

A promise that resolves to the dictionary wilcard lookup data.


apiWordQuery()

function apiWordQuery(word): Promise<DictLookup>;

Defined in: src/services/dictApi.ts:14

Queries the dictionary API for a word.

Parameters

Parameter Type Description
word string The word to query.

Returns

Promise\<DictLookup>

A promise that resolves to the dictionary lookup data.


filterDictLookup()

function filterDictLookup(dictLookup): null | DictLookup;

Defined in: src/services/dictApi.ts:46

Filters empty placeholders from a DictLookup response object and returns null in case the response object is considered empty

Parameters

Parameter Type Description
dictLookup null | DictLookup The DictLookup object

Returns

null | DictLookup

The filtered object or null


filterDictWildcardLookup()

function filterDictWildcardLookup(dictLookup): null | DictWildcardLookup;

Defined in: src/services/dictApi.ts:94

Filters empty placeholders from a DictWildcardLookup response object and returns null in case the response object is considered empty

Parameters

Parameter Type Description
dictLookup null | DictWildcardLookup The DictWildcardLookup object

Returns

null | DictWildcardLookup

The filtered object or null