@jupyterlite / @jupyterlite/apputils / LiteTranslatorConnector
Class: LiteTranslatorConnector#
Defined in: packages/apputils/src/translation.ts:20
A class to fetch translation bundles.
Extends#
DataConnector<Language,Language, {language:string; } |undefined>
Implements#
ITranslatorConnector
Constructors#
Constructor#
new LiteTranslatorConnector():
LiteTranslatorConnector
Returns#
LiteTranslatorConnector
Inherited from#
DataConnector<Language, Language, { language: string } | undefined>.constructor
Methods#
fetch()#
Call Signature#
fetch():
Promise<ILanguageList>
Defined in: packages/apputils/src/translation.ts:24
Retrieve an item from the data connector.
Returns#
Promise<ILanguageList>
A promise that resolves with a data payload if available.
Notes#
The promise returned by this method may be rejected if an error occurs in
retrieving the data. Nonexistence of an id will succeed with undefined.
Implementation of#
ITranslatorConnector.fetch
Overrides#
DataConnector.fetch
Call Signature#
fetch(
opts):Promise<Language>
Defined in: packages/apputils/src/translation.ts:25
Parameters#
opts#
language#
string
Returns#
Promise<Language>
Implementation of#
ITranslatorConnector.fetch
Overrides#
DataConnector.fetch
list()#
list(
query?):Promise<{ids: (undefined| {language:string; })[];values:Language[]; }>
Defined in: node_modules/@jupyterlab/statedb/lib/dataconnector.d.ts:47
Retrieve the list of items available from the data connector.
Parameters#
query?#
string
The optional query filter to apply to the connector request.
Returns#
Promise<{ ids: (undefined | { language: string; })[]; values: Language[]; }>
A promise that always rejects with an error.
Notes#
Subclasses should reimplement if they support a back-end that can list.
Implementation of#
ITranslatorConnector.list
Inherited from#
DataConnector.list
remove()#
remove(
id):Promise<any>
Defined in: node_modules/@jupyterlab/statedb/lib/dataconnector.d.ts:61
Remove a value using the data connector.
Parameters#
id#
The identifier for the data being removed.
undefined | { language: string; }
Returns#
Promise<any>
A promise that always rejects with an error.
Notes#
Subclasses should reimplement if they support a back-end that can remove.
Implementation of#
ITranslatorConnector.remove
Inherited from#
DataConnector.remove
save()#
save(
id,value):Promise<any>
Defined in: node_modules/@jupyterlab/statedb/lib/dataconnector.d.ts:74
Save a value using the data connector.
Parameters#
id#
The identifier for the data being saved.
undefined | { language: string; }
value#
Language
The data being saved.
Returns#
Promise<any>
A promise that always rejects with an error.
Notes#
Subclasses should reimplement if they support a back-end that can save.
Implementation of#
ITranslatorConnector.save
Inherited from#
DataConnector.save