@ilingo/fs
Version:
This is a lightweight library for translation.
21 lines (20 loc) • 1 kB
TypeScript
import type { LocatorOptionsInput } from 'locter';
import type { Merger } from 'smob';
import type { LinesRecord, StoreGetContext, StoreSetContext } from 'ilingo';
import { MemoryStore } from 'ilingo';
import type { ConfigInput } from './types';
export declare class FSStore extends MemoryStore {
protected loaded: Record<string, string[]>;
protected directories: string[];
protected merger: Merger;
constructor(input?: ConfigInput);
get(context: StoreGetContext): Promise<string | undefined>;
set(context: StoreSetContext): Promise<void>;
getLocales(): Promise<string[]>;
protected isLoaded(group: string, locale: string): boolean;
protected setIsLoaded(group: string, locale: string): void;
loadGroup(group: string, locale: string): Promise<Record<string, any>>;
protected buildLocatorOptionsForLocale(locale?: string): LocatorOptionsInput;
protected addExtensionPattern(name: string): string;
protected mergeFiles(files: unknown[]): LinesRecord;
}