Types

@system-inc/base-foundation · 515c140 · 6 symbols

CountryCodeFormat: "alpha2" | "alpha3" | "numeric"

View source ↗

Shapes accepted by VerifyIsEnum:

  • a TypeScript enum (compiles to an object)
  • a const object literal mapping names to primitive values
  • a plain array of primitives

Element types are constrained to string | number because Array.prototype.includes — used under the hood — only handles value equality correctly for primitives. Object arrays would silently fail with reference equality, so they're rejected at compile time.

EnumLike: object | readonly (string | number)[]

View source ↗

IPVersion: "4" | "6" | 4 | 6

View source ↗

PhoneRegion: "e164" | "nanp" | "international"

View source ↗

Resolves to the right decorator shape for the given options type.

RuleDecorator: [TOptions] extends [void] ? VoidRuleDecorator : OptionsRuleDecorator<TOptions>

View source ↗

UUIDVersion: "1" | "3" | "4" | "5" | "6" | "7" | "8" | "all" | 1 | 3 | 4 | 5 | 6 | 7 | 8

View source ↗