The next API

This module contains new features we are working on which are backwards incompatible with the current API of Automerge. This module will become the API of the next major version of Automerge

Differences from stable

In the stable API text objects are represented using the Text class. This means you must decide up front whether your string data might need concurrent merges in the future and if you change your mind you have to figure out how to migrate your data. In the unstable API the Text class is gone and all strings are represented using the text CRDT, allowing for concurrent changes. Modifying a string is done using the splice function. You can still access the old behaviour of strings which do not support merging behaviour via the RawString class.

This leads to the following differences from stable:

  • There is no unstable.Text class, all strings are text objects
  • Reading strings in an unstable document is the same as reading any other javascript string
  • To modify strings in an unstable document use splice
  • The AutomergeValue type does not include the Text class but the RawString class is included in the ScalarValue type


  • Rename this module to next to reflect our increased confidence in it and stability commitment to it
  • Introduce this module to expose the new API which has no Text class




Type Aliases



Generated using TypeDoc