data-cap
    Preparing search index...

    Function createData

    • Declares a capability's field contract AND, optionally, the getters/ mutators/subscriptions that acquire, mutate, and continuously observe it -- the batteries-included counterpart to buildData + hand-wired createDataStore/coordinator calls. Internally: exactly one buildData call, exactly one createDataStore instance, and the given (or default) Coordinator -- see the module doc comment.

      A schema with no getters/mutators/subscriptions at all still works, returning a fully valid capability with zero bound operation methods -- the direct one-call equivalent of createDataStore(buildData({fields})).

      Type Parameters

      Parameters

      Returns DataCapability<TSchema>

      Experimental (see VERSIONING.md) -- the shape of this function may still change in a minor pre-1.0 release as real usage reveals a better one.