Skip to main content

Types

Parser (Type)

type Parser = MayAsync<
(options: { filePath: string; fileContent: Buffer }) => ParseResult
>;

ParseResult (Type)

type ParseResult = {
id: unknown;
translations: Record<string, unknown>;
namespace: string;
};

Matcher (Type)

type Matcher = RegExp | MayAsync<(filePath: string) => boolean>;

LocaleFile (Type)

type LocaleFile = {
filePath: string;
content: Buffer;
bytes: number;
};

CompiledLocales (Type)

type CompiledLocales = Record<string, Record<string, unknown>>;

Stats (Type)

type Stats = {
filePath: string;
isNew: boolean;
isChanged: boolean;
isDeleted: boolean;
localeNewFile: LocaleFile | null;
localeFileBefore: LocaleFile | null;
};