Interface RemoteDataSpec<SELF>

A dataspec which is part of a remote graph i.e. is a local copy of a remote object. A RemoteDataSpec's definition can be represented like a serializable query which can be sent to the remote graph. The result returned by the remote graph can then be ingested in the RemoteDataSpec state.

Type Parameters

Hierarchy

Implemented by

Properties

Methods

Properties

ready: boolean

Whether this dataspec is ready to use

Methods

  • Commit changes performed to this DataSpec object to its source of truth

    Returns Promise<void>

  • Ingest the result set of running the query into this dataspec's state

    Parameters

    • result: any

    Returns any

  • Construct a working copy of this dataspec.

    Changes to a working copy will not be automatically applied to its backing object. In order to propagate the changes, the user needs to explicitly call WorkingCopy.commit()

    When changes are applied to this object, they are automatically propagated to its working copies

    Parameters

    • Optional reactivityDecoratorFunction: (<T>(T: any) => T)

      optional function which will apply reactivity to the working copy. The function is expected to take the working copy, wrap it in a reactive proxy and return the wrapper. If specified, it will be invoked with the created working copy and the resulting object will be stored as a working copy. Alternatively the graph itself could allow for setting of a reactivity decorator with the same function

        • <T>(T: any): T
        • Type Parameters

          Parameters

          • T: any

          Returns T

    Returns SELF

Generated using TypeDoc