Installation
Sådan installeres i18n-error-base samt krav til brug.
Krav
- Et kørselsmiljø, der kan håndtere ES-moduler, f.eks. Node.js
valibot@^1.0.0kræves som peer-afhængighed
message følger lang fra Valibots 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-baseHvis Valibot ikke er installeret endnu, skal du også tilføje det.
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";
Næste trin
Se Brug for definition og grundlæggende sprogskift.