Skip to content

FormatErrorCode — @gj-kit/format

A public type from @gj-kit/format. The signature below is taken directly from the 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';

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/format
  • Version: 0.1.1
  • Public entry: .
  • Source: GitHub