Installation
How to install i18n-error-base and its requirements.
Requirements
- A runtime that can handle ES modules, such as Node.js.
valibot@^1.0.0is required as a peer dependency.
message follows lang from Valibot’s getGlobalConfig().
Installation
npm install i18n-error-basepnpm add i18n-error-baseyarn add i18n-error-basebun add i18n-error-basenub add i18n-error-baseaube add i18n-error-baseIf Valibot is not installed yet, add it as well.
npm install valibotpnpm add valibotyarn add valibotbun add valibotnub add valibotaube add valibotImport
import { I18nErrorBase, setErrorMessage } from "i18n-error-base";
import type { ErrorMeta, ErrorOptions, I18nErrorBaseParams, MessageFactory } from "i18n-error-base";
Next steps
See Usage for definition and switching basics.