Chuyển đến nội dung
i18n-error-base
Tiếng Việt
Esc
↑↓di chuyển↵mở⌘Jxem trước
Trên trang này

Cài đặt

Cách cài đặt i18n-error-base và yêu cầu hoạt động.

Yêu cầu

  • Môi trường thực thi có thể xử lý ES module như Node.js
  • Yêu cầu valibot@^1.0.0 dưới dạng peer dependency

message tuân theo lang từ getGlobalConfig() của Valibot.

Cài đặt

npm install i18n-error-base
pnpm add i18n-error-base
yarn add i18n-error-base
bun add i18n-error-base
nub add i18n-error-base
aube add i18n-error-base

Nếu chưa cài Valibot, hãy thêm cùng lúc.

npm install valibot
pnpm add valibot
yarn add valibot
bun add valibot
nub add valibot
aube add valibot

Import

import { I18nErrorBase, setErrorMessage } from "i18n-error-base";
import type { ErrorMeta, ErrorOptions, I18nErrorBaseParams, MessageFactory } from "i18n-error-base";

Các bước tiếp theo

Xem Cách dùng để biết cách định nghĩa và chuyển đổi cơ bản.

Trang này có hữu ích không?