Skip to content

pantoken-root / renderers/web-components/src / defineBundle

함수: defineBundle() ​

defineBundle(config): LocaleBundle

알파

LocaleBundle을 생성하고 검증합니다. Throws when required fields are missing or locale 이(가) 비어 있지 않은 문자열이 아닐 경우 예외를 발생시킵니다.

매개변수 ​

config ​

LocaleBundle

반환값 ​

LocaleBundle

예제 ​

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