Skip to content
GitHub

StringMessageKey

type alias in meocord/common Since 4.1.0

type StringMessageKey<C> = {
  [K in keyof C & string]: C[K] extends string
    ? K
    : IsPlural<C[K]> extends true
      ? never
      : `${K}.${StringMessageKey<C[K]>}`
}[keyof C & string]

The keys whose message is a single string rather than plural forms, with or without {params}.

See also