Skip to content

pantoken / renderers/web-components/src / defineBundle

Funkcja: defineBundle()

defineBundle(config): LocaleBundle

Alpha

Utwórz i zweryfikuj LocaleBundle. Rzuca wyjątek, gdy brak wymaganych pól lub locale nie jest niepustym ciągiem znaków.

Parametry

config

LocaleBundle

Zwraca

LocaleBundle

Przykład

ts
export const myLocale = defineBundle({
  locale: "x-acme",
  dir: "ltr",
  label: "Acme Corp Internal",
  strings: makeStrings("en", { back: "Return" }),
});