Type Parameters

  • V = any

Constructors

Properties

name?: string
ref: string
status: Status = Status.Ready
value?: V

Methods

  • This function clones the current state object by serializing and deserializing it.

    Parameters

    • -: {
          value: boolean;
      } = ...

      The clone function takes an optional object parameter

      • value: boolean

    Returns State<V>

    The clone method is returning a new instance of the State class

  • It returns an object with the properties ref, name, status, and value.

    Parameters

    • options: {
          value: boolean;
      } = ...

      value: true

      • value: boolean

    Returns {
        name?: string;
        ref: string;
        status: Status;
        value?: V;
    }

    An object with the ref, name, status, and value properties.

    • Optional name?: string
    • ref: string
    • status: Status
    • Optional value?: V
  • It returns a new instance of the State class, with the ref and options parameters passed to the constructor

    Type Parameters

    • V = any

    Parameters

    • ref: string

      The name of the state.

    • options: {
          name?: string;
          status?: Status;
          value?: V;
      }

      options

      • Optional name?: string
      • Optional status?: Status
      • Optional value?: V

    Returns State<V>

    A new instance of the State class.

  • It takes a State object and returns a new State object with the same properties

    Type Parameters

    • V = any

    Parameters

    Returns State<V>

    A new instance of the State class.

Generated using TypeDoc