UNPKG

angular-l10n

Version:

Angular library to translate texts, dates and numbers

26 lines (25 loc) 985 B
import { L10nLocale } from '../models/types'; import * as i0 from "@angular/core"; /** * Implement this class-interface to create a storage for the locale. */ export declare abstract class L10nStorage { /** * This method must contain the logic to read the storage. * @return A promise with the value of the locale */ abstract read(): Promise<L10nLocale | null>; /** * This method must contain the logic to write the storage. * @param locale The current locale */ abstract write(locale: L10nLocale): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<L10nStorage, never>; static ɵprov: i0.ɵɵInjectableDeclaration<L10nStorage>; } export declare class L10nDefaultStorage implements L10nStorage { read(): Promise<L10nLocale | null>; write(locale: L10nLocale): Promise<void>; static ɵfac: i0.ɵɵFactoryDeclaration<L10nDefaultStorage, never>; static ɵprov: i0.ɵɵInjectableDeclaration<L10nDefaultStorage>; }