The type that is returned when calling observeLocal() on a PendingCursorOperation object. It handles the logic for calling the event handler that is provided to observeLocal() calls.

Ditto will prevent the process from exiting as long as there are active live queries (not relevant when running in the browser).

LiveQuery objects must be kept in scope for as long as you wish to have your event handler be called when there is an update to a document matching the query you provide. When you no longer want to receive updates about documents matching a query then you must call stop().


  • LiveQuery





query: string

The query that the live query is based on.

queryArgs: QueryArguments

The arguments belonging to query.


  • get collectionName(): string
  • The name of the collection that the live query is based on.

    Returns string

  • get isStopped(): boolean
  • Returns true if the receiver has been stopped.

    Returns boolean


  • Stop the live query from delivering updates.

    Returns void