ilingo
Version:
This is a lightweight library for translation.
15 lines (14 loc) • 455 B
TypeScript
export type ValueOrNestedValue<T> = {
[key: string]: ValueOrNestedValue<T> | T;
};
export type LinesRecord = ValueOrNestedValue<string>;
export type GroupsRecord = Record<string, LinesRecord>;
export type LocalesRecord = Record<string, GroupsRecord>;
export type DotKey = `${string}.${string}`;
export type Data = Record<string, string | number>;
export type GetContext = {
data?: Data;
locale?: string;
group: string;
key: string;
};