Function attachSetter

  • Attach a new setter to a val.

    Type Parameters

    • TValue

    Parameters

    • val$: ReadonlyVal<TValue>

      a readonly Val

    • set: ((this, value) => void)

      a function that sets the value of val$

        • (this, value): void
        • Parameters

          Returns void

    Returns Val<TValue>

    The same val$ with the new setter.