콘텐츠로 이동

FormatErrorCode — @gj-kit/format

@gj-kit/format에서 공개하는 type입니다. package version 0.1.1의 release declaration을 그대로 표시합니다.

import { FormatErrorCode } from '@gj-kit/format';
/** Stable machine-readable codes. Never emitted for data problems. */
type FormatErrorCode =
/** Configuration error: `timeZone` is not 'UTC' | 'device' | a zone name the
* runtime's Intl accepts. A programmer can fix this. */
'ERR_TIMEZONE_INVALID'
/** Configuration error: `locale` is not a tag the runtime's Intl accepts
* (`'ko_KR'`, `'en US'`, `'ko-KR-'`). `FormatLocale` accepts any string, so
* this is the runtime half of that axis. A programmer can fix this. */
| 'ERR_LOCALE_INVALID'
/** Configuration error: `minimumFractionDigits`/`maximumFractionDigits` is not
* an integer in 0–100, or the minimum exceeds the maximum. A programmer can
* fix this. */
| 'ERR_FRACTION_DIGITS_INVALID'
/** Environment error: the runtime's Intl failed this package's self-test —
* it ignores the `timeZone` option, or ignores `hourCycle`/`hour12`.
* A programmer cannot fix this; ask {@link canFormatTimeZone} up front. */
| 'ERR_INTL_UNUSABLE'
/** Environment error: a single-field formatter produced a non-numeric or
* out-of-range string for this specific zone. */
| 'ERR_INTL_FIELD_OUTPUT';

이 선언은 매개변수, optionality, 제네릭, 반환값, 공개 union/type 계약의 정본입니다. 호출 전 필요한 환경·권한·오류 경계는 패키지 Golden path와 이 subpath의 import 조건을 함께 확인하세요.

  • 패키지: @gj-kit/format
  • 버전: 0.1.1
  • 공개 entry: .
  • 소스: GitHub

Stable machine-readable codes. Never emitted for data problems.