NoA IgniteAccelerator Docs
Contact ↗
GitHubGitHub
  • Get Started
      • Context
      • PaymentEmbed
      • createRenderBlock
      • createRequiredContext
      • createSvgIcon
      • getReactElementRef
      • isRefObject
      • setRef
      • useElementSize
      • useFocusReturn
      • useForkRef
      • useInert
      • useIntersectionObserver
      • useInterval
      • useIsomorphicEffect
      • useMediaQuery
      • useMutationObserver
      • useRTL
      • useResizeObserver
      • useSticky
      • useTimeout
      • useVisualViewport
      • useWindowSize
      • typography
      • AnyFunction
      • Concatenate
      • DistributiveOmit
      • HintedNumber
      • HintedString
      • KeyOfAny
      • MapKeys
      • Maybe
      • OverridableStringUnion
      • Overwrite
      • Prettify
      • PropsFrom
      • Repeat
      • Split
      • WithFallback
      • Writeable
      • assert
      • calculateContrast
      • calculateLuminance
      • capitalize
      • clamp
      • colorContrast
      • deepmerge
      • hexToRGB
      • isObject
      • isPlainObject
      • lerp
      • mapRange
      • normalize
      • omit
      • pick
      • range
      • sleep

On This Page

  • HintedString
  • Example
Question? Give us feedback →
@noaignitetypesHintedString

HintedString

Prevent TypeScript from collapsing a union of string literals into string. Useful when union should be part of IntelliSense suggestions, but any string value is also accepted.

Example

type Union = 'foo' | 'bar'
 
type Unhinted = Union | string // string
type Hinted = HintedString<Union> // 'foo' | 'bar' | string
HintedNumberKeyOfAny

Accelerator Docs