⚠️ Internal: This API is not publically exported by the package.

      A Value<T, TShrink = T> holds an internal value of type T and its associated context

      Remarks

      Since 3.0.0 (previously called NextValue in 2.15.0)

      Type Parameters

      • T

      Constructors

      • Type Parameters

        • T

        Parameters

        • value_: T

          Internal value of the shrinkable

        • context: unknown

          Context associated to the generated value (useful for shrink)

        • Optional customGetValue: (() => T)

          Limited to internal usages (to ease migration to next), it will be removed on next major

            • (): T
            • Returns T

        Returns Value<T>

      Properties

      context: unknown

      Context for the generated value TODO - Do we want to clone it too?

      Remarks

      2.15.0

      hasToBeCloned: boolean

      State storing the result of hasCloneMethod If true the value will be cloned each time it gets accessed

      Remarks

      Since 2.15.0

      value: T

      Safe value of the shrinkable Depending on hasToBeCloned it will either be value_ or a clone of it

      Remarks

      Since 2.15.0

      value_: T

      Internal value of the shrinkable

      Remarks

      Since 2.15.0