Skip to content
GitHub

MessageKey

type alias in meocord/common Since 4.1.0

type MessageKey<C> =
  IsUntypedCatalog<C> extends true ? UntypedCatalogKey : CatalogKeys<C>

Every message key of a catalog: the dotted path to each message or plural.

A key with a . in its own name is left out, as a lookup reads it as a path and never finds it; createTranslator warns about one. Nest it as a group.

For a translator typed without its catalog, as a bare Translator is, it is a sentence saying what to write, so a key given to one fails to compile with that sentence.