ilingo
Version:
This is a lightweight library for translation.
18 lines (17 loc) • 452 B
TypeScript
import type { LocalesRecord } from '../types';
export type StoreGetContext = {
locale: string;
group: string;
key: string;
};
export type StoreSetContext = StoreGetContext & {
value: string;
};
export interface IStore {
get(context: StoreGetContext): Promise<string | undefined>;
set(context: StoreSetContext): Promise<void>;
getLocales(): Promise<string[]>;
}
export type MemoryStoreOptions = {
data: LocalesRecord;
};