UNPKG

@rr0/lang

Version:

Language and translation

15 lines (14 loc) 442 B
import { KeyValue } from "@rr0/common"; import { Grammar } from "./Grammar.js"; import { Translator } from "./Translator.js"; /** * A Translator that holds its messages. * * @param T the message type */ export declare class Translation<T extends KeyValue> extends Translator { readonly locale: string; readonly messages: T; constructor(locale: string, grammar: Grammar, messages: T); add(key: string, value: any): void; }