• Preparing search index...
  • The search index is not available
value-enhancer - v5.5.3
  • value-enhancer
  • index
  • derive

Function derive

  • derive<TSrcValue, TValue>(val): ReadonlyVal<TValue>
  • Derive a new val with same value from the given val.

    Type Parameters

    • TSrcValue = any
    • TValue = any

    Parameters

    • val: ReadonlyVal<TSrcValue>

      Input value.

    Returns ReadonlyVal<TValue>

    A readonly val with same value as the input val.

    • Defined in src/derive.ts:33
  • derive<TSrcValue, TValue>(val, transform, config?): ReadonlyVal<TValue>
  • Derive a new val with transformed value from the given val.

    Type Parameters

    • TSrcValue = any
    • TValue = any

    Parameters

    • val: ReadonlyVal<TSrcValue>

      Input value.

    • transform: DerivedValTransform<TSrcValue, TValue>

      A pure function that takes an input value and returns a new value.

    • Optional config: ValConfig<TValue>

      custom config for the combined val.

    Returns ReadonlyVal<TValue>

    A readonly val with transformed value from the input val.

    • Defined in src/derive.ts:33

Settings

Theme

value-enhancer - v5.5.3
  • Loading...