import { Provider as ElectronProvider } from "electron" ; import { Locale } from "src/shared/model/common" ; export type FuzzyLocale = Locale | true | false ; export interface Provider extends ElectronProvider { isMisspelled ( text ) : boolean ; getSuggestions ( text ) : string [ ] ; add ( text ) : void ; } export interface Controller { getSpellCheckProvider ( ) : Readonly < Provider > ; getCurrentLocale ( ) : Exclude < FuzzyLocale , true > ; changeLocale ( locale ) : Promise < void > ; getAvailableDictionaries ( ) : Promise < readonly Locale [ ] > ; }