Skip to main content

@dialstack/sdk-dev / js/src / ParseProblemReason

Type Alias: ParseProblemReason

TypeScript
type ParseProblemReason = "invalid" | "not_us" | "toll_free" | "ambiguous" | "has_extension";

Defined in: sdk/js/src/utils/phone-list.ts:17

Why a line could not be turned into a number.

  • invalid — a single number that is not a real phone number
  • not_us — parses and is valid, but is not a US or Canadian number (the name predates Canadian support)
  • toll_free — a US toll-free number, refused unless the caller passes allowTollFree (a port order and the eligibility check take them)
  • ambiguous — digits that do not divide cleanly into whole numbers
  • has_extension — an extension is present, which we refuse to strip silently